Simon Sapin 2018-08-24 16:29:43 +02:00
parent 76dd6a4cdb
commit a9627d233f
6 changed files with 13 additions and 8 deletions

View file

@ -176,12 +176,17 @@ def extract_arg(name, args):
def extract_args(name, args):
assert "=" not in name
previous_arg_matches = False
for i, arg in enumerate(args):
if previous_arg_matches:
yield i, arg
previous_arg_matches = arg == name
arg, sep, value = arg.partition("=")
if arg == name and sep == "=":
yield i, value
def wait_for_tcp_server(adb, port):
while call(adb + ["shell", "nc -z 127.0.0.1 %s" % port], stdout=sys.stderr) != 0: