diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pyfedpkg/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 8f202b8..fe426c2 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -738,8 +738,11 @@ def sources(path, outdir=None): if not spec: raise FedpkgError('%s is not a valid repo' % path) module = spec.split('.spec')[0] - archives = open(os.path.join(path, 'sources'), - 'r').readlines() + try: + archives = open(os.path.join(path, 'sources'), + 'r').readlines() + except IOError, e: + raise FedpkgError('%s is not a valid repo: %s' % (path, e)) # Default to putting the files where the module is if not outdir: outdir = path |