misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
Simone Margaritelli 2019-10-23 19:28:05 +02:00
parent 5bf9f25a46
commit d20f6c8a52
No known key found for this signature in database
GPG Key ID: 82E42E7F3B34C97E
2 changed files with 5 additions and 2 deletions
pwnagotchi
plugins/default
utils.py

@ -135,4 +135,4 @@ def on_internet_available(agent):
logging.debug("grid: reporting disabled")
except Exception as e:
logging.error("grid api: %s" % e)
logging.error("grid api: %s" % e)

@ -108,7 +108,10 @@ def setup_logging(args, config):
console_handler = logging.StreamHandler()
console_handler.setFormatter(formatter)
root.addHandler(console_handler)
# https://stackoverflow.com/questions/24344045/how-can-i-completely-remove-any-logging-from-requests-module-in-python?noredirect=1&lq=1
requests_log = logging.getLogger("requests")
requests_log.addHandler(logging.NullHandler())
requests_log.propagate = False
def secs_to_hhmmss(secs):
mins, secs = divmod(secs, 60)