diff --git a/root/app/fanficdownload.py b/root/app/fanficdownload.py index 0cddc32..94ad9f4 100644 --- a/root/app/fanficdownload.py +++ b/root/app/fanficdownload.py @@ -176,10 +176,11 @@ def downloader(args): moving, cur, loc), shell=True, stderr=STDOUT, stdin=PIPE).decode('utf-8') check_regexes(res) # 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: 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}')