Use native open/io.open for file contents reading/writing

This commit is contained in:
Ivan Kravets
2020-03-05 23:52:13 +02:00
parent 3275bb59bf
commit ce6b96ea84
10 changed files with 56 additions and 39 deletions

View File

@@ -222,7 +222,8 @@ def device_monitor(ctx, **kwargs):
sleep(0.1)
if not t.is_alive():
return
kwargs["port"] = fs.get_file_contents(sock_file)
with open(sock_file) as fp:
kwargs["port"] = fp.read()
ctx.invoke(device.device_monitor, **kwargs)
t.join(2)
finally: