]> err.no Git - dak/commitdiff
daklib/archive.py: handle unexpected names for byhand files
authorAnsgar Burchardt <ansgar@debian.org>
Tue, 10 Jul 2012 17:32:59 +0000 (11:32 -0600)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 13 Jul 2012 16:45:20 +0000 (10:45 -0600)
daklib/archive.py

index d6f8f2f6155c944e5c40483ffa62726159a5b624..4a1be15ca464520765881b749db16f93408c6d7a 100644 (file)
@@ -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)