add if statement back in, fix other typo.

master
samerbam 1 year ago
parent d3d6b346fe
commit 0744116559

@ -176,10 +176,11 @@ def downloader(args):
moving, cur, loc), shell=True, stderr=STDOUT, stdin=PIPE).decode('utf-8') moving, cur, loc), shell=True, stderr=STDOUT, stdin=PIPE).decode('utf-8')
check_regexes(res) check_regexes(res)
# output += log(f'Cur: {get_files(loc, ".epub", True)}, len(cur): {len(get_files(loc, ".epub", True))}', 'BLUE', live) # output += log(f'Cur: {get_files(loc, ".epub", True)}, len(cur): {len(get_files(loc, ".epub", True))}', 'BLUE', live)
cur = get_files(loc, '.epub', True)[0] cur = get_files(loc, '.epub', True)
if len(cur) > 0: if len(cur) > 0:
cur = cur[0] cur = cur[0]
else : elif (len(cur) == 0):
# else:
raise Exception(f'Could not find .epub, work likely did not download. Exception raised on get_files(loc, ".epub", True)[0]. result from command is: {res}') raise Exception(f'Could not find .epub, work likely did not download. Exception raised on get_files(loc, ".epub", True)[0]. result from command is: {res}')

Loading…
Cancel
Save