Require KeyboardInterrupt to stop discovery

Otherwise discovery would stop after entering key passphrase
This commit is contained in:
Milan Stute
2020-12-02 11:58:24 +01:00
parent 2f9cdc97d1
commit e82ef8ac4a
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ Sending a file is typically a two-step procedure. You first discover devices in
Stop the process once you have found the receiver.
```
$ opendrop find
Looking for receivers. Press enter to stop ...
Looking for receivers. Press Ctrl+C to stop ...
Found index 0 ID eccb2f2dcfe7 name Johns iPhone
Found index 1 ID e63138ac6ba8 name Janes MacBook Pro
```
+3 -2
View File
@@ -113,11 +113,12 @@ class AirDropCli:
self.server.stop()
def find(self):
logger.info("Looking for receivers. Press enter to stop ...")
logger.info("Looking for receivers. Press Ctrl+C to stop ...")
self.browser = AirDropBrowser(self.config)
self.browser.start(callback_add=self._found_receiver)
try:
input()
while True:
pass
except KeyboardInterrupt:
pass
finally: