From 0dd3a12546a75642ff834cc8774c425a42ef4b57 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 3 Apr 2018 17:05:33 -0700 Subject: [PATCH] cosmetic changes, remove debug print --- src/wormhole/_rendezvous.py | 2 +- src/wormhole/test/test_machines.py | 3 +-- src/wormhole/wormhole.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/wormhole/_rendezvous.py b/src/wormhole/_rendezvous.py index 22d214a..963d12a 100644 --- a/src/wormhole/_rendezvous.py +++ b/src/wormhole/_rendezvous.py @@ -167,7 +167,7 @@ class RendezvousConnector(object): self._ws = proto try: self._tx("bind", appid=self._appid, side=self._side, - client_version=self._client_version) + client_version=self._client_version) self._N.connected() self._M.connected() self._L.connected() diff --git a/src/wormhole/test/test_machines.py b/src/wormhole/test/test_machines.py index 0d617bb..ec96fc0 100644 --- a/src/wormhole/test/test_machines.py +++ b/src/wormhole/test/test_machines.py @@ -1451,7 +1451,6 @@ class Rendezvous(unittest.TestCase): journal = ImmediateJournal() tor_manager = None client_version = ("python", __version__) - print(client_version) rc = _rendezvous.RendezvousConnector("ws://host:4000/v1", "appid", "side", reactor, journal, tor_manager, @@ -1505,7 +1504,7 @@ class Rendezvous(unittest.TestCase): self.assertEqual(c[1][1], False, ws.mock_calls) yield bytes_to_dict(c[1][0]) self.assertEqual(list(sent_messages(ws)), - [dict(appid="appid", side="side", + [dict(appid="appid", side="side", client_version=["python", __version__], id="0000", type="bind"), ]) diff --git a/src/wormhole/wormhole.py b/src/wormhole/wormhole.py index c1bda16..7522f8d 100644 --- a/src/wormhole/wormhole.py +++ b/src/wormhole/wormhole.py @@ -231,11 +231,10 @@ def create(appid, relay_url, reactor, # use keyword args for everything else w = _DeferredWormhole(eq) wormhole_versions = {} # will be used to indicate Wormhole capabilities wormhole_versions["app_versions"] = versions # app-specific capabilities - if (type(__version__) == str): + if type(__version__) == str: client_version = ("python", __version__) else: client_version = ("python", __version__.decode("utf-8", errors="replace")) - b = Boss(w, side, relay_url, appid, wormhole_versions, client_version, reactor, journal, tor, timing) w._set_boss(b)