diff --git a/britney.py b/britney.py index 0e18ec8..cf742de 100755 --- a/britney.py +++ b/britney.py @@ -480,7 +480,7 @@ class Britney(object): try: release_file = read_release_file(self.suite_info['testing'].path) self.log("Found a Release file in testing - using that for defaults") - except FileNotFoundError: + except IOError: self.log("Testing does not have a Release file.") release_file = None diff --git a/britney2/policies/policy.py b/britney2/policies/policy.py index fcd3093..4a231ce 100644 --- a/britney2/policies/policy.py +++ b/britney2/policies/policy.py @@ -320,7 +320,7 @@ class AgePolicy(BasePolicy): dates[l[0]] = (l[1], int(l[2])) except ValueError: pass - except FileNotFoundError: + except IOError: if not using_new_name: # If we using the legacy name, then just give up raise diff --git a/britney2/utils.py b/britney2/utils.py index acef624..25223c8 100644 --- a/britney2/utils.py +++ b/britney2/utils.py @@ -660,7 +660,7 @@ def possibly_compressed(path, permitted_compressesion=None): cpath = "%s.%s" % (path, ext) if os.path.exists(cpath): return cpath - raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), path) + raise OSError(errno.ENOENT, os.strerror(errno.ENOENT), path) def create_provides_map(packages):