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

[dak/security] do not try to access non-existant members, fix up the last patch



Signed-off-by: Philipp Kern <pkern@debian.org>
---
 daklib/utils.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/daklib/utils.py b/daklib/utils.py
index 86e51a2..7979344 100755
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -394,11 +394,12 @@ def parse_checksums(where, files, manifest, hashname):
         if not line:
             break
         hash, size, file = line.strip().split(' ')
+        if not files.has_key(file):
         # TODO: check for the file's entry in the original files dict, not
         # the one modified by (auto)byhand and other weird stuff
-        #if not files.has_key(file):
         #    rejmsg.append("%s: not present in files but in checksums-%s in %s" %
         #        (file, hashname, where))
+            continue
         if not files[file]["size"] == size:
             rejmsg.append("%s: size differs for files and checksums-%s entry "\
                 "in %s" % (file, hashname, where))
-- 
1.5.6.5



Reply to: