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

[or-cvs] Okay, one more time.



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

Modified Files:
	TorCtl1.py 
Log Message:
Okay, one more time.

Index: TorCtl1.py
===================================================================
RCS file: /home/or/cvsroot/control/python/TorCtl1.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- TorCtl1.py	17 Nov 2005 17:19:36 -0000	1.15
+++ TorCtl1.py	17 Nov 2005 17:34:17 -0000	1.16
@@ -159,18 +159,11 @@
         """
         while 1:
             ex = None
+            print "."
             try:
                 lines = _read_reply(self._s,self._debugFile)
             except:
-                _, err, _ = sys.exc_info()
-                try:
-                    cb = self._queue.get(timeout=0)
-                except Queue.Empty:
-                    cb = None
-                if cb == "CLOSED":
-                    ex = TorCtl.TorCtlClosed()
-                else:
-                    ex = err
+                tp, ex, tb = sys.exc_info()
 
             if ex is not None:
                 self._sendLock.acquire()
@@ -179,8 +172,12 @@
                     self._closed = 1
                 finally:
                     self._sendLock.release()
-                cb = self._queue.get()
-                cb("EXCEPTION")
+                while 1:
+                    try:
+                        cb = self._queue.get(timeout=0)
+                        cb("EXCEPTION")
+                    except Queue.Empty:
+                        return
 
             assert lines
             if lines[0][0][0] == "6":