X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=0b9fa8416ac33099f71ed828ebdd1f9913fa0208;hb=42ca3d8171b5e775d7424e1a3d037db935ee387a;hp=00939c7e384e325783c146aba626b7333f0899ae;hpb=8d1331a27a15093136a9a693e021d4dcbe44e847;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index 00939c7e..0b9fa841 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 @@ -72,6 +73,9 @@ def dak_getstatusoutput(cmd): output = "".join(pipe.stdout.readlines()) + if output[-1:] == '\n': + output = output[:-1] + ret = pipe.wait() if ret is None: ret = 0 @@ -304,13 +308,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,