py 2.7 3.x fix

This commit is contained in:
Baeumla 2018-03-09 10:20:03 +01:00
parent 0322d341e8
commit 82dc4a4e2e

View File

@ -236,7 +236,9 @@ def create(appid, relay_url, reactor, # use keyword args for everything else
wormhole_version = list(versions.values())[0] or ""
else:
wormhole_version = versions or ""
wormhole_version = wormhole_version.decode('unicode-escape')
#workaround for py2.7, py3.X
if sys.version_info < (3, 0):
wormhole_version = wormhole_version.decode('unicode-escape')
implementation = "python"
b = Boss(w, side, relay_url, appid, wormhole_versions, wormhole_version,
reactor, journal, tor, timing, implementation)
@ -253,6 +255,6 @@ def create(appid, relay_url, reactor, # use keyword args for everything else
## # now unpack state machines, including the SPAKE2 in Key
## b = Boss.from_serialized(w, serialized["boss"], reactor, journal, timing)
## w._set_boss(b)
## b.start() # ??
## b .start() # ??
## raise NotImplemented
## # should the new Wormhole call got_code? only if it wasn't called before.