diff options
author | 2011-08-13 10:55:41 +0200 | |
---|---|---|
committer | 2011-08-13 10:55:41 +0200 | |
commit | eb737b6165fd08cf54cdc25b16bcce5628015759 (patch) | |
tree | 4cb70fb95d9d9199a4e26a067aaea8860060f2fa | |
parent | Check whether PDEPs are merged before the ebuild. (diff) | |
download | pms-test-suite-eb737b6165fd08cf54cdc25b16bcce5628015759.tar.gz pms-test-suite-eb737b6165fd08cf54cdc25b16bcce5628015759.tar.bz2 pms-test-suite-eb737b6165fd08cf54cdc25b16bcce5628015759.zip |
Use EnvironmentError instead of (IOError, OSError).
-rw-r--r-- | pmstestsuite/cli.py | 2 | ||||
-rw-r--r-- | pmstestsuite/repository/__init__.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py index 8b8abe7..510d6d5 100644 --- a/pmstestsuite/cli.py +++ b/pmstestsuite/cli.py @@ -148,7 +148,7 @@ class PMSTestSuiteCLI(object): # XXX: all PMs should match it... self.repository = pm.get_repository(opts.repo_name) break - except (OSError, IOError, KeyError, ValueError) as e: + except (EnvironmentError, KeyError, ValueError) as e: opt.error('Repository open failed: %s' % e) try: diff --git a/pmstestsuite/repository/__init__.py b/pmstestsuite/repository/__init__.py index fa059ef..e464e1a 100644 --- a/pmstestsuite/repository/__init__.py +++ b/pmstestsuite/repository/__init__.py @@ -19,7 +19,7 @@ class EbuildRepository(object): @param path: path to the repository @type path: string - @raise IOError: for repo_name file operations + @raise EnvironmentError: for repo_name file operations @raise ValueError: if repo_name contents are invalid """ self.path = path @@ -34,7 +34,7 @@ class EbuildRepository(object): f = open(catspath, 'r'); self.categories = [l.strip() for l in f.readlines()] f.close() - except IOError: + except EnvironmentError: self.categories = [] if not self.repo_name: |