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

[or-cvs] fix crash



Update of /home/or/cvsroot/tor/contrib
In directory moria.mit.edu:/tmp/cvs-serv28886/contrib

Modified Files:
	ExerciseServer.py 
Log Message:
fix crash

Index: ExerciseServer.py
===================================================================
RCS file: /home/or/cvsroot/tor/contrib/ExerciseServer.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ExerciseServer.py	31 Mar 2005 06:05:36 -0000	1.2
+++ ExerciseServer.py	31 Mar 2005 06:08:48 -0000	1.3
@@ -86,7 +86,8 @@
         elif status in (TorControl.STREAM_STATUS.CLOSED,
                         TorControl.STREAM_STATUS.FAILED):
             circid, (host,url) = streamsByIdent[ident]
-            del circs[circid]
+            if circs.has_key(circid):
+                del circs[circid]
             del streamsByIdent[ident]
     elif event == TorControl.EVENT_TYPE.CIRCSTATUS:
         status, ident, path = args