Add place holder for pending info

This commit is contained in:
Luke Murphy 2020-07-23 12:24:56 +02:00
parent a585311501
commit 41634265f0
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -23,6 +23,14 @@ log = logging.getLogger("dropship")
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
class PendingTransfer:
"""A wormhole send waiting for a wormhole receive."""
def __init__(self, code):
"""Object initialisation."""
self.code = code
class DropShip: class DropShip:
"""Drag it, drop it, ship it.""" """Drag it, drop it, ship it."""
@ -32,6 +40,7 @@ class DropShip:
self.CSS_FILE = "dropship.css" self.CSS_FILE = "dropship.css"
self._running = loop.create_future() self._running = loop.create_future()
self._pending = []
self.init_glade() self.init_glade()
self.init_css() self.init_css()
@ -125,6 +134,8 @@ class DropShip:
code = line.split()[-1] code = line.split()[-1]
self.drop_label.set_text(code) self.drop_label.set_text(code)
self._pending.append(PendingTransfer(code))
# TODO(decentral1se): waits forever... # TODO(decentral1se): waits forever...
await process.wait() await process.wait()