Skip to content

Commit

Permalink
better auto-reconnect test helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Dirolf committed Aug 5, 2010
1 parent 0169f3c commit 7a79560
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/auto_reconnect_test.py
Expand Up @@ -14,8 +14,10 @@

"""Simple script to help test auto-reconnection."""

import sys
import threading
import time
sys.path[0:0] = [""]

from pymongo.errors import AutoReconnect
from pymongo.connection import Connection
Expand All @@ -33,7 +35,7 @@ def run(self):
db.test.remove(id)
db.connection.end_request()
print "Y"
except Exception, e:
except AutoReconnect, e:
print e
print "N"

Expand Down

0 comments on commit 7a79560

Please sign in to comment.