[tor-commits] [ooni-probe/master] comment about errback placement

art at torproject.org art at torproject.org
Fri Sep 22 18:41:07 UTC 2017


commit 33daa2edf4e9406f4e81b97029a9ce9ba3d564c1
Author: meejah <meejah at meejah.ca>
Date:   Wed Apr 26 14:54:56 2017 -0600

    comment about errback placement
---
 ooni/utils/onion.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ooni/utils/onion.py b/ooni/utils/onion.py
index c4d5d4c3..283579cd 100644
--- a/ooni/utils/onion.py
+++ b/ooni/utils/onion.py
@@ -379,6 +379,9 @@ class TorLauncherWithRetries(object):
         log.debug("Building a TorState")
         config.tor.protocol = proto
         state = TorState(proto.tor_protocol)
+        # note that errors from _state_complete will only get handled
+        # if we add the errback *after* -- which is why this isn't
+        # using .addCallbacks(..)
         state.post_bootstrap.addCallback(self._state_complete)
         state.post_bootstrap.addErrback(self._setup_failed)
 





More information about the tor-commits mailing list