Add recv place holder
This commit is contained in:
parent
91354a3b37
commit
2921d4aa4d
17
dropship.py
17
dropship.py
@ -40,6 +40,8 @@ class DropShip:
|
|||||||
self.GLADE_FILE = "dropship.glade"
|
self.GLADE_FILE = "dropship.glade"
|
||||||
self.CSS_FILE = "dropship.css"
|
self.CSS_FILE = "dropship.css"
|
||||||
|
|
||||||
|
self.DOWNLOAD_DIR = os.path.expanduser("~")
|
||||||
|
|
||||||
self._running = loop.create_future()
|
self._running = loop.create_future()
|
||||||
self._pending = []
|
self._pending = []
|
||||||
|
|
||||||
@ -132,7 +134,20 @@ class DropShip:
|
|||||||
|
|
||||||
self._pending.append(PendingTransfer(code))
|
self._pending.append(PendingTransfer(code))
|
||||||
|
|
||||||
# TODO(decentral1se): waits forever...
|
await process.wait()
|
||||||
|
|
||||||
|
|
||||||
|
async def wormhole_recv(self, widget, code):
|
||||||
|
"""Run `wormhole receive` with a pending transfer code."""
|
||||||
|
process = await asyncio.create_subprocess_exec(
|
||||||
|
"wormhole",
|
||||||
|
"receive",
|
||||||
|
"--accept-file",
|
||||||
|
"--hide-progress",
|
||||||
|
code,
|
||||||
|
stdout=asyncio.subprocess.PIPE,
|
||||||
|
stderr=asyncio.subprocess.PIPE,
|
||||||
|
)
|
||||||
await process.wait()
|
await process.wait()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user