From 3ddecd26bf689dea8802c4c3884a19d6dfe62e4c Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 21 Mar 2015 10:37:09 +0100 Subject: [PATCH] fix lastseen handling of non-alfred nodes --- nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 49d9fc4..3a52753 100644 --- a/nodes.py +++ b/nodes.py @@ -30,6 +30,7 @@ def prune_nodes(nodes, now, days): del nodes[node_id] def mark_online(node, now): + node['lastseen'] = now.isoformat() node.setdefault('firstseen', now.isoformat()) node['flags']['online'] = True @@ -41,7 +42,6 @@ def import_nodeinfo(nodes, nodeinfos, now, assume_online=False): node['flags']['gateway'] = False if assume_online: - node['lastseen'] = now.isoformat() mark_online(node, now) def reset_statistics(nodes):