mirror of
https://github.com/evilsocket/pwnagotchi.git
synced 2026-01-23 02:24:15 +00:00
catches wifi down exception and cycles epoch
Signed-off-by: Troy Stauffer <troystauffer@gmail.com>
This commit is contained in:
parent
5ec621c5d7
commit
3c678104ef
1 changed files with 7 additions and 2 deletions
|
|
@ -83,8 +83,13 @@ def do_auto_mode(agent):
|
|||
plugins.on('internet_available', agent)
|
||||
|
||||
except Exception as e:
|
||||
logging.exception("main loop exception (%s)", e)
|
||||
|
||||
if str(e).find("wifi.interface not set") > 0:
|
||||
logging.exception("main loop exception due to unavailable wifi device, likely programmatically disabled (%s)", e)
|
||||
logging.info("sleeping 60 seconds then advancing to next epoch to allow for cleanup code to trigger")
|
||||
time.sleep(60)
|
||||
agent.next_epoch()
|
||||
else:
|
||||
logging.exception("main loop exception (%s)", e)
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue