From cb09648ba17293f695837e8e04ec3895e5f620df Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Wed, 30 Oct 2019 14:11:14 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- pwnagotchi/log.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/log.py b/pwnagotchi/log.py index dda28e0..7177cc0 100644 --- a/pwnagotchi/log.py +++ b/pwnagotchi/log.py @@ -137,7 +137,7 @@ class LastSession(object): 'channel': 1, 'rssi': int(rssi), 'identity': pubkey, - 'advertisement':{ + 'advertisement': { 'name': name, 'pwnd_tot': int(pwnd_tot) }}) @@ -171,7 +171,7 @@ class LastSession(object): if skip: logging.debug("skipping parsing of the last session logs ...") else: - logging.debug("parsing last session logs ...") + logging.debug("reading last session logs ...") lines = [] @@ -193,6 +193,8 @@ class LastSession(object): self.last_session_id = hashlib.md5(lines[0].encode()).hexdigest() self.last_saved_session_id = self._get_last_saved_session_id() + logging.debug("parsing last session logs (%d lines) ..." % len(lines)) + self._parse_stats() self.parsed = True