From 1a42876521ebdf0e0097e9b15fa6eb6c8557d74c Mon Sep 17 00:00:00 2001 From: TheKysek Date: Mon, 17 Oct 2016 19:12:45 +0200 Subject: [PATCH] Use older pickle protocol to be compatible with Python versions older than 3.4 --- src/manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manager.py b/src/manager.py index ce53667..b6e3b92 100644 --- a/src/manager.py +++ b/src/manager.py @@ -94,7 +94,7 @@ class Manager(threading.Thread): try: with open(shared.data_directory + 'objects.pickle', mode='bw') as file: with shared.objects_lock: - pickle.dump(shared.objects, file, protocol=4) + pickle.dump(shared.objects, file, protocol=3) logging.debug('Saved objects') except Exception as e: logging.warning('Error while saving objects') @@ -108,7 +108,7 @@ class Manager(threading.Thread): shared.unchecked_node_pool = set(random.sample(shared.unchecked_node_pool, 1000)) try: with open(shared.data_directory + 'nodes.pickle', mode='bw') as file: - pickle.dump(shared.node_pool, file, protocol=4) + pickle.dump(shared.node_pool, file, protocol=3) logging.debug('Saved nodes') except Exception as e: logging.warning('Error while saving nodes')