]> err.no Git - dak/commitdiff
seek and ye shall find
authorMark Hymers <mhy@debian.org>
Sun, 15 Nov 2009 17:31:18 +0000 (17:31 +0000)
committerMark Hymers <mhy@debian.org>
Sun, 15 Nov 2009 17:31:18 +0000 (17:31 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/import_new_files.py

index 6cae2f0c7860c1e8c617bb031248a883aa41e6b8..2e35728642330690e595544cfcc069c92bd4018d 100755 (executable)
@@ -96,12 +96,14 @@ class ImportNewFiles(object):
                         cpf.sha1sum = u.pkg.files[chg_fn]['sha1sum']
                     else:
                         log.warning("Having to generate sha1sum for %s" % chg_fn)
+                        f.seek(0)
                         cpf.sha1sum = apt_pkg.sha1sum(f)
 
                     if u.pkg.files[chg_fn].has_key('sha256sum'):
                         cpf.sha256sum = u.pkg.files[chg_fn]['sha256sum']
                     else:
                         log.warning("Having to generate sha256sum for %s" % chg_fn)
+                        f.seek(0)
                         cpf.sha256sum = apt_pkg.sha256sum(f)
 
                     session.add(cpf)