dirty hack to fix the commandline parser again
This commit is contained in:
parent
005ce85104
commit
cce602c421
@ -9,8 +9,14 @@ async def wormhole_send(fpath, parent, task_status=TASK_STATUS_IGNORED):
|
|||||||
"""Run `wormhole send` on a local file path."""
|
"""Run `wormhole send` on a local file path."""
|
||||||
with CancelScope() as scope:
|
with CancelScope() as scope:
|
||||||
command = ["wormhole", "send", fpath]
|
command = ["wormhole", "send", fpath]
|
||||||
process = await open_process(command, stderr=PIPE)
|
process = await open_process(command, stderr=PIPE, stdout=PIPE)
|
||||||
|
|
||||||
output = await process.stderr.receive_some()
|
output = await process.stderr.receive_some()
|
||||||
|
#this is some nasty hacky shit
|
||||||
|
async for i in process.stderr:
|
||||||
|
if b"On the other computer" in i:
|
||||||
|
output = i
|
||||||
|
break
|
||||||
code = output.decode().split()[-1]
|
code = output.decode().split()[-1]
|
||||||
task_status.started((code, scope,))
|
task_status.started((code, scope,))
|
||||||
log.info(f"wormhole_send: now waiting for other side ({code})")
|
log.info(f"wormhole_send: now waiting for other side ({code})")
|
||||||
|
Loading…
Reference in New Issue
Block a user