Permalink
Browse files

ha_tools should catch ConnectionFailure, not AutoReconnect PYTHON-396

  • Loading branch information...
1 parent d1dc112 commit 9b2b75066dd58acb9bc2b2f83f9f4d9c88f7e51c @ajdavis ajdavis committed Nov 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/high_availability/ha_tools.py
@@ -26,6 +26,7 @@
from stat import S_IRUSR
import pymongo
+import pymongo.errors
home = os.environ.get('HOME')
default_dbpath = os.path.join(home, 'data', 'pymongo_high_availability')
@@ -153,7 +154,7 @@ def start_replica_set(members, auth=False, fresh=True):
len(get_secondaries()) == expected_secondaries and
len(get_arbiters()) == expected_arbiters):
break
- except pymongo.errors.AutoReconnect:
+ except pymongo.errors.ConnectionFailure:
# Keep waiting
pass
else:

0 comments on commit 9b2b750

Please sign in to comment.