From bce1d4da532e5f147dc7b290bc7662ae9fe7fd0c Mon Sep 17 00:00:00 2001 From: Pepe Barbe Date: Mon, 13 Aug 2012 16:01:05 -0500 Subject: [PATCH] Use Python 2.4 compatible syntax --- library/postgresql_db | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/postgresql_db b/library/postgresql_db index 73fe86374fd..1b894f71b17 100755 --- a/library/postgresql_db +++ b/library/postgresql_db @@ -83,7 +83,7 @@ def main(): # Enable autocommit so we can create databases db_connection.autocommit = True cursor = db_connection.cursor() - except Exception as e: + except Exception, e: module.fail_json(msg="unable to connect to database: %s" % e) try: @@ -93,7 +93,7 @@ def main(): else: if state == "present": changed = db_create(cursor, db, owner, template, encoding) - except Exception as e: + except Exception, e: module.fail_json(msg="Database query failed: %s" % e) module.exit_json(changed=changed, db=db)