From e86defe355e4a3ef417babf08915bd36c6cb9b0e Mon Sep 17 00:00:00 2001 From: "Michael E. Palmer" Date: Tue, 20 Aug 2019 23:43:18 -0700 Subject: [PATCH] assign None to receiver_name, which would otherwise be referenced before assignment, after a timeout --- opendrop/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opendrop/cli.py b/opendrop/cli.py index 56c1212..db12eff 100644 --- a/opendrop/cli.py +++ b/opendrop/cli.py @@ -125,6 +125,7 @@ class AirDropCli: try: receiver_name = client.send_discover() except TimeoutError: + receiver_name = None pass else: receiver_name = None