X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=45d1895d7a4ceae0f1ec17b5742238df6deb7efc;hb=cbb68a41962a14602304a71ac8c894ce3a1997f2;hp=00939c7e384e325783c146aba626b7333f0899ae;hpb=8d1331a27a15093136a9a693e021d4dcbe44e847;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index 00939c7e..45d1895d 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -72,6 +72,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 +307,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,