1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

Merge pull request #124 from ep1cman/master

BaseLinuxDevice: gzipped property files are now zcat'ed
This commit is contained in:
setrofim 2016-03-24 16:30:32 +00:00
commit a077e7df3c

View File

@ -214,7 +214,10 @@ class BaseLinuxDevice(Device): # pylint: disable=abstract-method
outfile = os.path.join(context.host_working_directory, normname)
if self.is_file(propfile):
with open(outfile, 'w') as wfh:
wfh.write(self.execute('cat {}'.format(propfile)))
if propfile.endswith(".gz"):
wfh.write(self.execute('{} zcat {}'.format(self.busybox, propfile)))
else:
wfh.write(self.execute('cat {}'.format(propfile)))
elif self.is_directory(propfile):
self.pull_file(propfile, outfile)
else: