From 5beb34227ed7f4ed90dab36898795adba7507b4d Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 4 Aug 2008 17:04:19 -0400 Subject: [PATCH] Change slightly the output of _doCheckSum so that it's type:hash for easier parsing. --- src/pypungi/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pypungi/util.py b/src/pypungi/util.py index d566326c..99c82cbf 100644 --- a/src/pypungi/util.py +++ b/src/pypungi/util.py @@ -90,7 +90,7 @@ def _ensuredir(target, logger, force=False, clean=False): def _doCheckSum(path, hash, logger): """Generate a checksum hash from a provided path. - Return the hash""" + Return a string of type:hash""" # Try to figure out what hash we want to do try: @@ -115,4 +115,4 @@ def _doCheckSum(path, hash, logger): sum.update(chunk) myfile.close() - return sum.hexdigest() + return '%s:%s' % (hash, sum.hexdigest())