From 4c184d8ffed8da06525e2791227a92b6e2f742ee Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 2 Oct 2018 12:35:35 +0300 Subject: [PATCH] Fix import of pickled knownnodes.dat --- src/knownnodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/knownnodes.py b/src/knownnodes.py index ac2d668c..b1a78334 100644 --- a/src/knownnodes.py +++ b/src/knownnodes.py @@ -60,9 +60,10 @@ def pickle_deserialize_old_knownnodes(source): the old format was {Peer:lastseen, ...} the new format is {Peer:{"lastseen":i, "rating":f}} """ + global knownNodes # pylint: disable=global-statement knownNodes = pickle.load(source) for stream in knownNodes.keys(): - for node, params in knownNodes[stream].items(): + for node, params in knownNodes[stream].iteritems(): if isinstance(params, (float, int)): addKnownNode(stream, node, params)