From: Ansgar Burchardt Date: Tue, 10 Jul 2012 17:32:59 +0000 (-0600) Subject: daklib/archive.py: handle unexpected names for byhand files X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f86d721179d151e138d9e76f3bad12a42d25dc2;p=dak daklib/archive.py: handle unexpected names for byhand files --- diff --git a/daklib/archive.py b/daklib/archive.py index d6f8f2f6..4a1be15c 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -899,7 +899,13 @@ class ArchiveUpload(object): remaining = [] for f in byhand: - package, version, archext = f.filename.split('_', 2) + parts = f.filename.split('_', 2) + if len(parts) != 3: + print "W: unexpected byhand filename {0}. No automatic processing.".format(f.filename) + remaining.append(f) + continue + + package, version, archext = parts arch, ext = archext.split('.', 1) rule = automatic_byhand_packages.get(package)