mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2026-07-28 14:37:00 -07:00
fix(wpa-sec): use set.add() instead of list.append() for skip_until_reload
skip_until_reload is initialized as a set, but on_internet_available called .append() on it, which sets don't support. This raised an AttributeError whenever an upload failed and the handshake needed to be skipped until reload, masking the original upload error in the logs Signed-off-by: Bready2Crumble <83258877+BraedenP232@users.noreply.github.com>
This commit is contained in:
@@ -125,7 +125,7 @@ class WpaSec(plugins.Plugin):
|
||||
|
||||
except requests.exceptions.RequestException:
|
||||
logging.exception("WPA_SEC: RequestException uploading %s, skipping until reload.", handshake)
|
||||
self.skip_until_reload.append(handshake)
|
||||
self.skip_until_reload.add(handshake)
|
||||
except OSError:
|
||||
logging.exception("WPA_SEC: OSError uploading %s, deleting from db.", handshake)
|
||||
cursor.execute('DELETE FROM handshakes WHERE path = ?', (handshake,))
|
||||
|
||||
Reference in New Issue
Block a user