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.
This commit is contained in:
Brian Warner 2017-11-07 20:50:40 -06:00
parent a4cca39c0e
commit d1a829d86f

View File

@ -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: