mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-01 19:02:31 +01:00
BaseLinuxDevice: gzipped property files are now zcat'ed
Before they were cat'ed this gave garbage output for compressed files. Cat-ing is necessary since not all properties are normal files (sysfs).
This commit is contained in:
@@ -214,6 +214,9 @@ class BaseLinuxDevice(Device): # pylint: disable=abstract-method
|
|||||||
outfile = os.path.join(context.host_working_directory, normname)
|
outfile = os.path.join(context.host_working_directory, normname)
|
||||||
if self.is_file(propfile):
|
if self.is_file(propfile):
|
||||||
with open(outfile, 'w') as wfh:
|
with open(outfile, 'w') as wfh:
|
||||||
|
if propfile.endswith(".gz"):
|
||||||
|
wfh.write(self.execute('{} zcat {}'.format(self.busybox, propfile)))
|
||||||
|
else:
|
||||||
wfh.write(self.execute('cat {}'.format(propfile)))
|
wfh.write(self.execute('cat {}'.format(propfile)))
|
||||||
elif self.is_directory(propfile):
|
elif self.is_directory(propfile):
|
||||||
self.pull_file(propfile, outfile)
|
self.pull_file(propfile, outfile)
|
||||||
|
Reference in New Issue
Block a user