mirror of
https://github.com/ansible/awx.git
synced 2026-04-04 17:55:06 -02:30
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:
@@ -23,6 +23,6 @@ def test_mongo_connection():
|
|||||||
tz_aware=settings.USE_TZ)
|
tz_aware=settings.USE_TZ)
|
||||||
db[settings.MONGO_DB].command('ping')
|
db[settings.MONGO_DB].command('ping')
|
||||||
return True
|
return True
|
||||||
except ConnectionError, AutoReconnect:
|
except (ConnectionError, AutoReconnect):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user