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

This commit is contained in:
Simone Margaritelli 2019-10-13 18:29:56 +02:00
parent 8d2cbee8df
commit ba7c0ee4e6
No known key found for this signature in database
GPG Key ID: 82E42E7F3B34C97E

@ -129,10 +129,12 @@ class LastSession(object):
if m:
name, pubkey, rssi, sid, pwnd_tot, uptime = m[0]
if pubkey not in cache:
self.last_peer = Peer(sid, 1, int(rssi),
{'name': name,
'identity': pubkey,
'pwnd_tot': int(pwnd_tot)})
self.last_peer = Peer({
'session_id': sid,
'channel': 1,
'rssi': int(rssi),
'identity': pubkey,
'advertisement':{'pwnd_tot': int(pwnd_tot)}})
self.peers += 1
cache[pubkey] = self.last_peer
else: