RawImageCreator: remove meter for hash calculation
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 18 Oct 2012 14:48:49 +0000 (17:48 +0300)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 18 Oct 2012 15:47:57 +0000 (18:47 +0300)
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 <artem.bityutskiy@intel.com>
mic/imager/raw.py

index db0cb7e..6503f39 100644 (file)
@@ -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 += "    <disk file='%s' use='system' format='%s'>\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 +=  "      <checksum type='sha1'>%s</checksum>\n" \