diff --git a/database/postgresql/postgresql_db.py b/database/postgresql/postgresql_db.py index 233ae3d1c87..941644d6fb1 100644 --- a/database/postgresql/postgresql_db.py +++ b/database/postgresql/postgresql_db.py @@ -311,6 +311,9 @@ def main(): module.fail_json(msg=str(e)) except NotSupportedError, e: module.fail_json(msg=str(e)) + except SystemExit: + # Avoid catching this on Python 2.4 + raise except Exception, e: module.fail_json(msg="Database query failed: %s" % e)