summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-08-12 00:12:04 -0700
committerJesse Keating <jkeating@redhat.com>2010-08-12 00:12:04 -0700
commitde0c8aa1bd6aa96dd28729234f9a81532720c44f (patch)
tree445b26cab35e8490920836235cba0b5cec95b154 /src
parent67728d4e090ea7e6ae1fe0e72db70fdb634ee174 (diff)
downloadfedora-packager-de0c8aa1bd6aa96dd28729234f9a81532720c44f.tar.gz
fedora-packager-de0c8aa1bd6aa96dd28729234f9a81532720c44f.tar.xz
fedora-packager-de0c8aa1bd6aa96dd28729234f9a81532720c44f.zip
Catch malformed sources file. #621808
Diffstat (limited to 'src')
-rw-r--r--src/pyfedpkg/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index e02191d..d0d9139 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -539,7 +539,10 @@ def sources(path, outdir=None):
if not outdir:
outdir = path
for archive in archives:
- csum, file = archive.split()
+ try:
+ csum, file = archive.split()
+ except ValueError:
+ raise FedpkgError('Malformed sources file.')
# See if we already have a valid copy downloaded
outfile = os.path.join(outdir, file)
if os.path.exists(outfile):