X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=a9dea9201cd7e25aa7373461eccfd901468022c8;hb=9fa241c825a40bd09bd1c2e6b7f065f4a1dc0481;hp=5edf2cb1eeddcd34a3dd7f5237b029a3f863ba8c;hpb=1c35448b880358d020e81339657e3435fdda9434;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index 5edf2cb1..a9dea920 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -394,7 +394,12 @@ def parse_checksums(where, files, manifest, hashname): for line in manifest[field].split('\n'): if not line: break - checksum, size, checkfile = line.strip().split(' ') + clist = line.strip().split(' ') + if len(clist) == 3: + checksum, size, checkfile = clist + else: + rejmsg.append("Cannot parse checksum line [%s]" % (line)) + continue if not files.has_key(checkfile): # TODO: check for the file's entry in the original files dict, not # the one modified by (auto)byhand and other weird stuff @@ -671,7 +676,7 @@ def TemplateSubst(map, filename): templatefile = open_file(filename) template = templatefile.read() for x in map.keys(): - template = template.replace(x,map[x]) + template = template.replace(x, str(map[x])) templatefile.close() return template