[dak/master] daklib/archive.py: handle byhand files without underscores
---
daklib/archive.py | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/daklib/archive.py b/daklib/archive.py
index 81719a8..410e9ca 100644
--- a/daklib/archive.py
+++ b/daklib/archive.py
@@ -1061,14 +1061,26 @@ class ArchiveUpload(object):
remaining = []
for f in byhand:
- 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
+ if '_' in f.filename:
+ 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)
+ else:
+ parts = f.filename.split('.')
+ if len(parts) < 2:
+ 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)
+ package = parts[0]
+ version = '0'
+ arch = 'all'
+ ext = parts[-1]
try:
rule = automatic_byhand_packages.subtree(package)
--
1.7.10.4
Reply to: