misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
8d2cbee8df
commit
ba7c0ee4e6
@ -129,10 +129,12 @@ class LastSession(object):
|
|||||||
if m:
|
if m:
|
||||||
name, pubkey, rssi, sid, pwnd_tot, uptime = m[0]
|
name, pubkey, rssi, sid, pwnd_tot, uptime = m[0]
|
||||||
if pubkey not in cache:
|
if pubkey not in cache:
|
||||||
self.last_peer = Peer(sid, 1, int(rssi),
|
self.last_peer = Peer({
|
||||||
{'name': name,
|
'session_id': sid,
|
||||||
'identity': pubkey,
|
'channel': 1,
|
||||||
'pwnd_tot': int(pwnd_tot)})
|
'rssi': int(rssi),
|
||||||
|
'identity': pubkey,
|
||||||
|
'advertisement':{'pwnd_tot': int(pwnd_tot)}})
|
||||||
self.peers += 1
|
self.peers += 1
|
||||||
cache[pubkey] = self.last_peer
|
cache[pubkey] = self.last_peer
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user