[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Our ONLINE target could fail with an undefined 'streams'



commit 6069f40bcb5114265345dd74fb312d9af46ee8a3
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Feb 9 09:07:08 2015 -0800

    Our ONLINE target could fail with an undefined 'streams'
    
    Doesn't make the test pass, but was masking the actual issue which is
    "SocksError: [6] TTL expired".
    
    ======================================================================
    ERROR: test_attachstream
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/atagar/Desktop/stem/test/integ/control/controller.py", line 1206, in test_attachstream
        our_stream = [stream for stream in streams if stream.target_address == host][0]
    UnboundLocalError: local variable 'streams' referenced before assignment
---
 test/integ/control/controller.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index 0839bc1..6ec03a0 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -1176,7 +1176,7 @@ class TestController(unittest.TestCase):
     host = '38.229.72.14'   # www.torproject.org
     port = 80
 
-    circuit_id = None
+    circuit_id, streams = None, []
 
     def handle_streamcreated(stream):
       if stream.status == 'NEW' and circuit_id:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits