From 9717b67d1b9be267872e2691086e3422325cdd07 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 6 Apr 2017 12:27:06 -0700 Subject: [PATCH] comment out serialize() for now until it's implemented fully --- src/wormhole/_boss.py | 4 ++-- src/wormhole/wormhole.py | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/wormhole/_boss.py b/src/wormhole/_boss.py index 1784d3c..4fa7213 100644 --- a/src/wormhole/_boss.py +++ b/src/wormhole/_boss.py @@ -113,8 +113,8 @@ class Boss(object): file.flush() names[machine].set_trace(tracer) - def serialize(self): - raise NotImplemented + ## def serialize(self): + ## raise NotImplemented # and these are the state-machine transition functions, which don't take # args diff --git a/src/wormhole/wormhole.py b/src/wormhole/wormhole.py index b3cf73d..c8ca8b0 100644 --- a/src/wormhole/wormhole.py +++ b/src/wormhole/wormhole.py @@ -66,11 +66,11 @@ class _DelegatedWormhole(object): def set_code(self, code): self._boss.set_code(code) - def serialize(self): - s = {"serialized_wormhole_version": 1, - "boss": self._boss.serialize(), - } - return s + ## def serialize(self): + ## s = {"serialized_wormhole_version": 1, + ## "boss": self._boss.serialize(), + ## } + ## return s def send(self, plaintext): self._boss.send(plaintext) @@ -269,15 +269,15 @@ def create(appid, relay_url, reactor, # use keyword args for everything else b.start() return w -def from_serialized(serialized, reactor, delegate, - journal=None, tor_manager=None, - timing=None, stderr=sys.stderr): - assert serialized["serialized_wormhole_version"] == 1 - timing = timing or DebugTiming() - w = _DelegatedWormhole(delegate) - # 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() # ?? - raise NotImplemented - # should the new Wormhole call got_code? only if it wasn't called before. +## def from_serialized(serialized, reactor, delegate, +## journal=None, tor_manager=None, +## timing=None, stderr=sys.stderr): +## assert serialized["serialized_wormhole_version"] == 1 +## timing = timing or DebugTiming() +## w = _DelegatedWormhole(delegate) +## # 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() # ?? +## raise NotImplemented +## # should the new Wormhole call got_code? only if it wasn't called before.