Appease formatter

This commit is contained in:
Luke Murphy 2020-09-15 11:59:03 +02:00
parent c722d8aeee
commit ca493bc326
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -104,7 +104,8 @@ class DropShip:
else: else:
log.info("Multiple file sending coming soon ™") log.info("Multiple file sending coming soon ™")
def update_send_ui (self):
def update_send_ui(self):
# UI response after adding files # UI response after adding files
self.drop_label.set_visible(False) self.drop_label.set_visible(False)
@ -129,17 +130,18 @@ class DropShip:
"""Read wormhole send code from command-line output.""" """Read wormhole send code from command-line output."""
while True: while True:
output = process.stderr.readline() # (rra) Why is it printing to stderr tho? output = (
if output == '' and process.poll() is not None: process.stderr.readline()
) # (rra) Why is it printing to stderr tho?
if output == "" and process.poll() is not None:
print(output) print(output)
return #(rra) We need some exception handling here return # (rra) We need some exception handling here
if output: if output:
log.info(output) log.info(output)
if output.startswith(b'Wormhole code is: '): if output.startswith(b"Wormhole code is: "):
code_line = output.decode('utf-8') code_line = output.decode("utf-8")
return code_line.split()[-1] return code_line.split()[-1]
def on_recv(self, entry): def on_recv(self, entry):
"""Handler for receiving transfers.""" """Handler for receiving transfers."""
code = entry.get_text() code = entry.get_text()