Logg deluge stdout to log file on remove and fixed issue where the name to delete from deluge was the absolute path not just the filename.

This commit is contained in:
2019-04-29 22:13:40 +02:00
parent 4e5f5e5172
commit 9c95395827

View File

@@ -72,6 +72,8 @@ def removeFromDeluge(execScript, files):
execPython = '/usr/bin/python2'
for file in files:
file = file.split('/')[-1]
print('Removing {} from deluge'.format(file))
logger.info('Removing {} from deluge'.format(file))
cmd = "{} {} rm '{}'".format(execPython, execScript, file)
@@ -82,6 +84,7 @@ def removeFromDeluge(execScript, files):
if stderr:
logger.error('Deluge error:', stderr)
logger.info('Deluge response:', stdout)
logger.info('Successfully removed: ', file)
def main():