[RARSLAVE] Fix exception syntax
[rarslave2.git] / rarslave.py
index ce6e6ec..27db583 100644 (file)
@@ -210,7 +210,7 @@ def find_likely_files (dir, p2file):
        name_matches = [f for f in os.listdir (dir) if regex.match (f)]
        try:
                parsed_matches = Par2Parser.get_protected_files (dir, p2file)
-       except EnvironmentError:
+       except (EnvironmentError, OSError, OverflowError):
                parsed_matches = []
                logger.addMessage ('Bad par2 file: %s' % p2file, RarslaveLogger.MessageType.Fatal)
 
@@ -283,7 +283,7 @@ def find_extraction_heads (dir, files):
                        try:
                                prot_files = Par2Parser.get_protected_files (dir, f)
                                done = True
-                       except EnvironmentError:
+                       except (EnvironmentError, OverflowError, OSError):
                                logger.addMessage ('Error parsing PAR2 file: %s', f)
                                continue