[PAR2PARSER] Fix Par2Parser class
[rarslave2.git] / rarslave.py
index ce6e6ec..f02f356 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