提交 e9cf8b94 编写于 作者: L Liangliang He

Fix python code style against pycodestyle 2.4.0

上级 cad35db5
......@@ -29,9 +29,13 @@ def adb_split_stdout(stdout_str):
def adb_devices(target_socs=None):
outputs = sh.grep(sh.adb("devices"), "^[A-Za-z0-9]\+[[:space:]]\+device$")
raw_lists = sh.cut(outputs, "-f1")
device_ids = adb_split_stdout(raw_lists)
device_ids = []
p = re.compile(r'(\w+)\s+device')
for line in adb_split_stdout(sh.adb("devices")):
m = p.match(line)
if m:
device_ids.append(m.group(1))
if target_socs is not None:
target_socs_set = set(target_socs)
target_devices = []
......@@ -48,7 +52,7 @@ def adb_getprop_by_serialno(serialno):
outputs = sh.adb("-s", serialno, "shell", "getprop")
raw_props = adb_split_stdout(outputs)
props = {}
p = re.compile("\[(.+)\]: \[(.+)\]")
p = re.compile(r'\[(.+)\]: \[(.+)\]')
for raw_prop in raw_props:
m = p.match(raw_prop)
if m:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册