mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-26 15:54:36 +02:00
catch OSErrors due to missing path
This commit is contained in:
@@ -99,7 +99,7 @@ def save_readability(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEO
|
|||||||
# Check for common failure cases
|
# Check for common failure cases
|
||||||
if (result.returncode > 0):
|
if (result.returncode > 0):
|
||||||
raise ArchiveError('Readability was not able to archive the page', hints)
|
raise ArchiveError('Readability was not able to archive the page', hints)
|
||||||
except Exception as err:
|
except (Exception, OSError) as err:
|
||||||
status = 'failed'
|
status = 'failed'
|
||||||
output = err
|
output = err
|
||||||
finally:
|
finally:
|
||||||
|
@@ -71,7 +71,7 @@ def save_singlefile(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEOU
|
|||||||
if (result.returncode > 0):
|
if (result.returncode > 0):
|
||||||
raise ArchiveError('SingleFile was not able to archive the page', hints)
|
raise ArchiveError('SingleFile was not able to archive the page', hints)
|
||||||
chmod_file(output)
|
chmod_file(output)
|
||||||
except Exception as err:
|
except (Exception, OSError) as err:
|
||||||
status = 'failed'
|
status = 'failed'
|
||||||
output = err
|
output = err
|
||||||
finally:
|
finally:
|
||||||
|
Reference in New Issue
Block a user