[tor-commits] [stem/master] Controller.extend_circuit now checks for failures properly

atagar at torproject.org atagar at torproject.org
Thu Dec 6 17:06:42 UTC 2012


commit 7882d3cfeec98a478046a779e531a6013558c348
Author: Ravi Chandra Padmala <neenaoffline at gmail.com>
Date:   Thu Dec 6 19:39:16 2012 +0530

    Controller.extend_circuit now checks for failures properly
---
 stem/control.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stem/control.py b/stem/control.py
index 4d3bc8b..3252793 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -1418,7 +1418,7 @@ class Controller(BaseController):
         assert extended == "EXTENDED"
       except:
         raise stem.ProtocolError("EXTENDCIRCUIT response invalid:\n%s", str(response))
-    elif response.code == ('512', '552'):
+    elif response.code in ('512', '552'):
       raise stem.InvalidRequest(response.code, response.message)
     else:
       raise stem.ProtocolError("EXTENDCIRCUIT returned unexpected response code: %s" % response.code)





More information about the tor-commits mailing list