From 667d8a266744937adfe23f92f220a9f459dbf000 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Mon, 7 Dec 2015 13:48:19 -0500 Subject: [PATCH] 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. --- awx/fact/utils/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/fact/utils/connection.py b/awx/fact/utils/connection.py index 4ea5f23bd1..4c4019e24d 100644 --- a/awx/fact/utils/connection.py +++ b/awx/fact/utils/connection.py @@ -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