]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/utils.py
handle bad checksum lines
[dak.git] / daklib / utils.py
index 32cba98f03443ec560faed686d839b9381f760f3..dc201e3f9a61ff4dcced2658db3f41e570a1c032 100755 (executable)
@@ -394,7 +394,12 @@ def parse_checksums(where, files, manifest, hashname):
     for line in manifest[field].split('\n'):
         if not line:
             break
-        checksum, size, checkfile = line.strip().split(' ')
+        clist = line.strip().split(' ')
+        if len(clist) == 3:
+            checksum, size, checkfile = clist
+        else:
+            rejmsg.append("Cannot parse checksum line [%s]" % (line))
+            continue
         if not files.has_key(checkfile):
         # TODO: check for the file's entry in the original files dict, not
         # the one modified by (auto)byhand and other weird stuff