[tor-commits] [ooni-probe/master] state null check

art at torproject.org art at torproject.org
Fri May 9 20:45:01 UTC 2014


commit 8452924ad680658ff4f0cebfe5b44311aa7f2db3
Author: Arun Pandian G <arunpandianp at gmail.com>
Date:   Fri May 2 22:06:04 2014 +0530

    state null check
---
 ooni/templates/httpt.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ooni/templates/httpt.py b/ooni/templates/httpt.py
index 1263261..59b550e 100644
--- a/ooni/templates/httpt.py
+++ b/ooni/templates/httpt.py
@@ -327,7 +327,8 @@ class HTTPTest(NetTestCase):
 
         if use_tor:
             state = config.tor_state
-            state.add_stream_listener(StreamListener(request))
+            if state:
+                state.add_stream_listener(StreamListener(request))
 
         d = agent.request(request['method'], request['url'], headers,
                 body_producer)





More information about the tor-commits mailing list