TransRead: remove code duplication
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 28 Jan 2014 11:05:09 +0000 (13:05 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 28 Jan 2014 12:23:22 +0000 (14:23 +0200)
commit8074b69098fef2c04f2aaa727c474fdf9ea19a03
treee0b83bb6a586d5214b1de429cbc556d73d17271c
parent8d67371d1ee1bdf568540644f0950351dc935246
TransRead: remove code duplication

We had some amount of duplicated code related to opening a tar file - introduce
a '_open_tarfile()' helper function for this instead.

On top of this, stop using 'tarfile' modules for opening 'tar.gz' and 'tar.bz2'
files since for some reasons this is a lot slower than using the
'_CompressedFile' module, like we do for 'tar.xz' files.

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