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

[or-cvs] bugfix: fix some errors that occur in get_option



Update of /home/or/cvsroot/control/python
In directory moria:/tmp/cvs-serv27979

Modified Files:
	TorCtl1.py 
Log Message:
bugfix: fix some errors that occur in get_option


Index: TorCtl1.py
===================================================================
RCS file: /home/or/cvsroot/control/python/TorCtl1.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- TorCtl1.py	16 Nov 2005 19:22:57 -0000	1.12
+++ TorCtl1.py	17 Nov 2005 04:45:18 -0000	1.13
@@ -17,7 +17,7 @@
     return re.sub(r'([\r\n\\\"])', r'\\\1', s)
 
 def _escape_dots(s, translate_nl=1):
-    if translate_ln:
+    if translate_nl:
         lines = re.split(r"\r?\n", s)
     else:
         lines = s.split("\r\n")
@@ -185,7 +185,7 @@
                 cb = self._queue.get()
                 cb(lines)
 
-    def _sendAndRecv(self, msg="", expectedTypes=("250",)):
+    def _sendAndRecv(self, msg="", expectedTypes=("250", "251")):
         """Helper: Send a command 'msg' to Tor, and wait for a command
            in response.  If the response type is in expectedTypes,
            return a list of (tp,body,extra) tuples.  If it is an