From d1a829d86fb194c6077f44542e7a15bb10fcfd6b Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 7 Nov 2017 20:50:40 -0600 Subject: [PATCH] server.py: tolerate (disabled) --transit= We were unconditionally asking the Transit server object for get_stats(), which doesn't work if there isn't one. --- src/wormhole/server/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wormhole/server/server.py b/src/wormhole/server/server.py index 0174eca..c913b1c 100644 --- a/src/wormhole/server/server.py +++ b/src/wormhole/server/server.py @@ -167,7 +167,8 @@ class RelayServer(service.MultiService): start = time.time() data["rendezvous"] = self._rendezvous.get_stats() - data["transit"] = self._transit.get_stats() + if self._transit: + data["transit"] = self._transit.get_stats() log.msg("get_stats took:", time.time() - start) with open(tmpfn, "wb") as f: