Переглянути джерело

catch OSErrors due to missing path

Nick Sweeting 5 роки тому
батько
коміт
a2c158e43e

+ 1 - 1
archivebox/extractors/readability.py

@@ -99,7 +99,7 @@ def save_readability(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEO
         # Check for common failure cases
         if (result.returncode > 0):
             raise ArchiveError('Readability was not able to archive the page', hints)
-    except Exception as err:
+    except (Exception, OSError) as err:
         status = 'failed'
         output = err
     finally:

+ 1 - 1
archivebox/extractors/singlefile.py

@@ -71,7 +71,7 @@ def save_singlefile(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEOU
         if (result.returncode > 0):
             raise ArchiveError('SingleFile was not able to archive the page', hints)
         chmod_file(output)
-    except Exception as err:
+    except (Exception, OSError) as err:
         status = 'failed'
         output = err
     finally: