[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] daklib/archive.py: handle unexpected names for byhand files



---
 daklib/archive.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/daklib/archive.py b/daklib/archive.py
index d6f8f2f..4a1be15 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)
-- 
1.7.2.5



Reply to: