seemoo-lab / opendrop

An open Apple AirDrop implementation written in Python
https://owlink.org
GNU General Public License v3.0
8.5k stars 266 forks source link

assign None to receiver_name #15

Closed mepster closed 4 years ago

mepster commented 4 years ago

assign None to receiver_name, which would otherwise be referenced before assignment, after a timeout:

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/home/pi/Repos/opendrop/opendrop/cli.py", line 131, in _send_discover discoverable = receiver_name is not None UnboundLocalError: local variable 'receiver_name' referenced before assignment

This change fixes the problem above.

Great project!

schmittner commented 4 years ago

Thanks for the fix!