fix singlefile extractor exception when result is none

This commit is contained in:
Nick Sweeting 2024-05-17 20:12:18 -07:00
parent 29c7aa26bc
commit 774ce3fda7
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -94,7 +94,8 @@ def save_singlefile(link: Link, out_dir: Optional[Path]=None, timeout: int=TIMEO
status = 'failed'
# TODO: Make this prettier. This is necessary to run the command (escape JSON internal quotes).
cmd[2] = browser_args.replace('"', "\\\"")
err.hints = (result.stdout + result.stderr).decode().split('\n')
if result:
err.hints = (result.stdout + result.stderr).decode().split('\n')
output = err
finally:
timer.end()