X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=b0e9a0d74c83e8c57d48f4fc82a46456f3224666;hb=6c695061a5552aad04f8959efa510e05588fd063;hp=a6660ae1b9e291f89306dbc4ab1b032a09491ba5;hpb=1c99dd656bfc809b40a26afd005d101dfd7442ad;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index a6660ae1..b0e9a0d7 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -45,7 +45,8 @@ from dak_exceptions import * from textutils import fix_maintainer from regexes import re_html_escaping, html_escaping, re_single_line_field, \ re_multi_line_field, re_srchasver, re_taint_free, \ - re_gpg_uid, re_re_mark, re_whitespace_comment, re_issource + re_gpg_uid, re_re_mark, re_whitespace_comment, re_issource, \ + re_is_orig_source from formats import parse_format, validate_changes_format from srcformats import get_format_from_string @@ -304,13 +305,13 @@ def check_hash(where, files, hashname, hashfunc): try: try: file_handle = open_file(f) - + # Check for the hash entry, to not trigger a KeyError. if not files[f].has_key(hash_key(hashname)): rejmsg.append("%s: misses %s checksum in %s" % (f, hashname, where)) continue - + # Actually check the hash for correctness. if hashfunc(file_handle) != files[f][hash_key(hashname)]: rejmsg.append("%s: %s check failed in %s" % (f, hashname,