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

This commit is contained in:
Simone Margaritelli 2019-10-30 14:11:14 +01:00
parent 03b85ac66b
commit cb09648ba1
No known key found for this signature in database
GPG Key ID: 82E42E7F3B34C97E

View File

@ -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