From 5c1edaaa08124743cefe8c92c571f7f8ce27ea7f Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Thu, 18 Oct 2012 17:48:49 +0300 Subject: [PATCH] RawImageCreator: remove meter for hash calculation We currently use the progress meter when calculating hash functions of the raw image file. Well, there is nothing bad with this, but this is not really necessary. I am removing this because I am going to introduce a helper function for calculating hashes, and I do not want to complicate it with a meter. So, remove the meter. We can add it back if we find this necessary in the future. This makes the code a bit less complex as well. Change-Id: I7da651f82dcbb14e16e1dccbbc4ee73cc1aa7e0b Signed-off-by: Artem Bityutskiy --- mic/imager/raw.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mic/imager/raw.py b/mic/imager/raw.py index db0cb7e..6503f39 100644 --- a/mic/imager/raw.py +++ b/mic/imager/raw.py @@ -455,12 +455,10 @@ class RawImageCreator(BaseImageCreator): diskpath = self._full_path(self._outdir, name, \ self.__disk_format) disk_size = os.path.getsize(diskpath) - meter_ct = 0 - meter = progress.TextMeter() full_name = self._full_name(name, self.__disk_format) - meter.start(size = disk_size, \ - text = "Generating disk signature for %s" \ - % full_name) + + msger.debug("Generating disk signature for %s" % full_name) + xml += " \n" \ % (full_name, self.__disk_format) @@ -474,8 +472,6 @@ class RawImageCreator(BaseImageCreator): m1.update(chunk) if m2: m2.update(chunk) - meter.update(meter_ct) - meter_ct = meter_ct + 65536 sha1checksum = m1.hexdigest() xml += " %s\n" \ -- 2.7.4