Python 3.4 fixes

This commit is contained in:
TheKysek 2017-07-01 17:05:39 +02:00
parent 57fffaafc0
commit 912d5331b9
No known key found for this signature in database
GPG Key ID: 50D9AF00D0B1C497

View File

@ -1,3 +1,4 @@
import base64
import hashlib import hashlib
import logging import logging
import multiprocessing import multiprocessing
@ -33,7 +34,7 @@ def _worker(obj):
logging.debug("Finished doing POW, nonce: {}, time: {}s".format(nonce, time.time() - t)) logging.debug("Finished doing POW, nonce: {}, time: {}s".format(nonce, time.time() - t))
obj = structure.Object(nonce, obj.expires_time, obj.object_type, obj.version, obj.stream_number, obj.object_payload) obj = structure.Object(nonce, obj.expires_time, obj.object_type, obj.version, obj.stream_number, obj.object_payload)
logging.debug("Object vector is {}".format(obj.vector.hex())) logging.debug("Object vector is {}".format(base64.b16encode(obj.vector).decode()))
with shared.objects_lock: with shared.objects_lock:
shared.objects[obj.vector] = obj shared.objects[obj.vector] = obj