TransRead: support .gizp extension
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Fri, 20 Sep 2013 14:10:23 +0000 (17:10 +0300)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Fri, 20 Sep 2013 14:14:16 +0000 (17:14 +0300)
We support GnuZip files, but only look at the .gz extension, and forget about
.gzip extension. This patch fixes the situation.

Change-Id: Id5775a84fe1d0dfba87333e9f430c4931324c7e9
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/TransRead.py

index 5790b15798b49d1794c2c51b2bfc34ebdee3c6fa..a182b51babc67488f32aacada39ed53100f56fe8 100644 (file)
@@ -294,7 +294,8 @@ class TransRead:
                 self.size = member.size
                 f_obj = self._f_objs[-1].extractfile(member)
                 self._f_objs.append(f_obj)
-            elif self.name.endswith('.gz'):
+            elif self.name.endswith('.gz') \
+                 or self.name.endswith('.gzip'):
                 import zlib
 
                 decompressor = zlib.decompressobj(16 + zlib.MAX_WBITS)