1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +00:00

sysfile_getter: fixed Exception when both device and host paths are empty.

This commit is contained in:
Sergei Trofimov 2015-06-26 12:14:02 +01:00
parent fcb6504f1e
commit 85c78e6566

View File

@ -166,7 +166,7 @@ class SysfsExtractor(Instrument):
for paths in self.device_and_host_paths:
after_dir = paths[self.AFTER_PATH]
dev_dir = paths[self.DEVICE_PATH].strip('*') # remove potential trailing '*'
if not os.listdir(after_dir) and self.device.listdir(dev_dir)[0]:
if not os.listdir(after_dir) and self.device.listdir(dev_dir):
self.logger.error('sysfs files were not pulled from the device.')
self.device_and_host_paths.remove(paths) # Path is removed to skip diffing it
for _, before_dir, after_dir, diff_dir in self.device_and_host_paths: