summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/ExerciseServer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/ExerciseServer.py b/contrib/ExerciseServer.py
index 9657d53473..8d3e2f2249 100644
--- a/contrib/ExerciseServer.py
+++ b/contrib/ExerciseServer.py
@@ -86,7 +86,8 @@ def handleEvent(s, body, circs, streamsByNonce, streamsByIdent):
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