mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
pylint
This commit is contained in:
parent
880a0bcb7c
commit
aab487c1ac
@ -68,7 +68,7 @@ class Platform(object):
|
|||||||
|
|
||||||
def _identify_big_core(self):
|
def _identify_big_core(self):
|
||||||
for core in self.core_names:
|
for core in self.core_names:
|
||||||
if core.upper() in BIG_CPUS:
|
if core.upper() in BIG_CPUS:
|
||||||
return core
|
return core
|
||||||
big_idx = self.core_clusters.index(max(self.core_clusters))
|
big_idx = self.core_clusters.index(max(self.core_clusters))
|
||||||
return self.core_names[big_idx]
|
return self.core_names[big_idx]
|
||||||
@ -88,4 +88,3 @@ class Platform(object):
|
|||||||
if core != self.big_core:
|
if core != self.big_core:
|
||||||
self.little_core = core
|
self.little_core = core
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -669,7 +669,6 @@ class AndroidTarget(Target):
|
|||||||
else:
|
else:
|
||||||
return (0, 0)
|
return (0, 0)
|
||||||
|
|
||||||
|
|
||||||
def reset(self, fastboot=False): # pylint: disable=arguments-differ
|
def reset(self, fastboot=False): # pylint: disable=arguments-differ
|
||||||
try:
|
try:
|
||||||
self.execute('reboot {}'.format(fastboot and 'fastboot' or ''),
|
self.execute('reboot {}'.format(fastboot and 'fastboot' or ''),
|
||||||
@ -856,7 +855,7 @@ class AndroidTarget(Target):
|
|||||||
self.remove(on_device_executable, as_root=self.is_rooted)
|
self.remove(on_device_executable, as_root=self.is_rooted)
|
||||||
|
|
||||||
def dump_logcat(self, filepath, filter=None, append=False, timeout=30): # pylint: disable=redefined-builtin
|
def dump_logcat(self, filepath, filter=None, append=False, timeout=30): # pylint: disable=redefined-builtin
|
||||||
op = '>>' if append == True else '>'
|
op = '>>' if append else '>'
|
||||||
filtstr = ' -s {}'.format(filter) if filter else ''
|
filtstr = ' -s {}'.format(filter) if filter else ''
|
||||||
command = 'logcat -d{} {} {}'.format(filtstr, op, filepath)
|
command = 'logcat -d{} {} {}'.format(filtstr, op, filepath)
|
||||||
adb_command(self.adb_name, command, timeout=timeout)
|
adb_command(self.adb_name, command, timeout=timeout)
|
||||||
@ -1071,4 +1070,3 @@ def _get_part_name(section):
|
|||||||
if name is None:
|
if name is None:
|
||||||
name = '{}/{}/{}'.format(implementer, part, variant)
|
name = '{}/{}/{}'.format(implementer, part, variant)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ class AdbConnection(object):
|
|||||||
timeout = self.timeout
|
timeout = self.timeout
|
||||||
# Pull all files matching a wildcard expression
|
# Pull all files matching a wildcard expression
|
||||||
if os.path.isdir(dest) and \
|
if os.path.isdir(dest) and \
|
||||||
('*' in source or '?' in source):
|
('*' in source or '?' in source):
|
||||||
command = 'shell ls {}'.format(source)
|
command = 'shell ls {}'.format(source)
|
||||||
output = adb_command(self.device, command, timeout=timeout)
|
output = adb_command(self.device, command, timeout=timeout)
|
||||||
for line in output.splitlines():
|
for line in output.splitlines():
|
||||||
@ -241,7 +241,7 @@ def adb_get_device(timeout=None):
|
|||||||
return output[1].split('\t')[0]
|
return output[1].split('\t')[0]
|
||||||
elif output_length > 3:
|
elif output_length > 3:
|
||||||
message = '{} Android devices found; either explicitly specify ' +\
|
message = '{} Android devices found; either explicitly specify ' +\
|
||||||
'the device you want, or make sure only one is connected.'
|
'the device you want, or make sure only one is connected.'
|
||||||
raise HostError(message.format(output_length - 2))
|
raise HostError(message.format(output_length - 2))
|
||||||
else:
|
else:
|
||||||
if timeout < time.time() - start:
|
if timeout < time.time() - start:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user