commit ded14d732c8875e8c2ab09e74f47db41a1d5d51a Author: Damian Johnson atagar@torproject.org Date: Sat Jun 1 19:31:07 2013 -0700
Don't set our controller to None when disconnected
Several of our changes expect us to have a controller attribute, so setting it to None causes a stacktrace when tor is shut down. Actually, stem provides us with graceful re-attachability so there's no reason to get rid of our Controller instance so simply leaving it alone. --- src/util/torTools.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/util/torTools.py b/src/util/torTools.py index 1ed1bbb..adc4d93 100644 --- a/src/util/torTools.py +++ b/src/util/torTools.py @@ -132,9 +132,7 @@ class Controller: self.connLock.acquire() if self.controller: self.controller.close() - self.controller = None - self.connLock.release() - else: self.connLock.release() + self.connLock.release()
def getController(self): return self.controller
tor-commits@lists.torproject.org