fix the connection check fix

* Multiple exceptions in except should be a tuple. Otherwise, the second
parameter will be the error object. Apposed to the intent, for it to be
another exception in a list of exceptions.
This commit is contained in:
Chris Meyers 2015-12-07 13:48:19 -05:00
parent 78ac2ccb55
commit 667d8a2667

View File

@ -23,6 +23,6 @@ def test_mongo_connection():
tz_aware=settings.USE_TZ)
db[settings.MONGO_DB].command('ping')
return True
except ConnectionError, AutoReconnect:
except (ConnectionError, AutoReconnect):
return False