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

[dak/master] handle bad checksum lines



Signed-off-by: Mark Hymers <mhy@debian.org>
---
 daklib/utils.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/daklib/utils.py b/daklib/utils.py
index 32cba98..dc201e3 100755
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -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
-- 
1.5.6.5



Reply to: