X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=a9dea9201cd7e25aa7373461eccfd901468022c8;hb=b4e3c53932577a6320da839ef998c5710ddadd2b;hp=32cba98f03443ec560faed686d839b9381f760f3;hpb=f558a3d8c95f65f905d46681c1d43e6986fee256;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index 32cba98f..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 @@ -691,6 +696,9 @@ def warn(msg): def whoami (): return pwd.getpwuid(os.getuid())[4].split(',')[0].replace('.', '') +def getusername (): + return pwd.getpwuid(os.getuid())[0] + ################################################################################ def size_type (c):