logging.debug('==============Acquire an available DUT==============')
candidate = [dev for dev in self._all_devices
- if dev['devicename'] == devicename]
+ if dev['devicename'] == devicename]
if candidate:
for times in range(0, max_retry_times):
"""docstring for find_usb_busid"""
pattern = 'usb (.*):.*idVendor={0}, idProduct={1}'.format(self._vid,
self._pid)
- kernlog = 'cat /var/log/kern.log | grep usb | tail -n 20'
+ kernlog = 'dmesg | grep usb | tail -n 20'
outs = check_output(kernlog, shell=True, timeout=10)
result = find_all_pattern(pattern=pattern, data=outs)
if result:
"""docstring for _find_usb_bus_and_device_address"""
pattern = 'usb (.*):.*idVendor={0}, idProduct={1}'.format(self._vid,
self._pid)
- kernlog = 'cat /var/log/kern.log | grep usb | tail -n 20'
+ kernlog = 'dmesg | grep usb | tail -n 20'
outs = check_output(kernlog, shell=True, timeout=10)
result = find_all_pattern(pattern=pattern, data=outs)
if result:
self._heimdall(filenames=filenames,
busaddr=busaddr,
devaddr=devaddr,
- partition_bin_mappings=partition_bin_mappings)
+ partition_bin_mappings=partition_bin_mappings)
except (Exception, KeyboardInterrupt) as e:
self._release_global_lock()
logging.debug(e)