Signed-off-by: Mark Hymers <mhy@debian.org>
2008-08-15 Mark Hymers <mhy@debian.org>
+ * daklib/utils.py: Actually check we have basedict before trying to
+ use it.
+
* dak/process_accepted.py, dak/process_unchecked.py,
daklib/database.py: Don't change get_files_id to use sha1sum and
sha256sum.
rejmsg.append("Could not open file %s for checksumming" % (f))
# Check hash
- basedict[f]['%ssum' % key] = testfn(file_handle)
+ if basedict:
+ basedict[f]['%ssum' % key] = testfn(file_handle)
file_handle.close()
return rejmsg
rejmsg.append("%s: %s check failed." % (f, key))
file_handle.close()
# Store the hashes for later use
- basedict[f]['%ssum' % key] = lfiles[f][key]
+ if basedict:
+ basedict[f]['%ssum' % key] = lfiles[f][key]
# Check size
actual_size = os.stat(f)[stat.ST_SIZE]
size = int(lfiles[f]["size"])