summaryrefslogtreecommitdiff
path: root/database/mysql
diff options
context:
space:
mode:
authorRené Moser <mail@renemoser.net>2016-08-10 12:35:01 +0200
committerGitHub <noreply@github.com>2016-08-10 12:35:01 +0200
commita216ef210b3d8fc332afb252cdf787f4744585f6 (patch)
treef3f619898bed042170f52cd4df785a28553477f0 /database/mysql
parent6a78349f65fc71a901caf6862c1b05e926509c98 (diff)
downloadansible-modules-core-a216ef210b3d8fc332afb252cdf787f4744585f6.tar.gz
mysql_db: use new exception handling, fixes build (#4373)
Diffstat (limited to 'database/mysql')
-rw-r--r--database/mysql/mysql_db.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/database/mysql/mysql_db.py b/database/mysql/mysql_db.py
index f5ff1c95..9d765e2b 100644
--- a/database/mysql/mysql_db.py
+++ b/database/mysql/mysql_db.py
@@ -322,7 +322,7 @@ def main():
module.fail_json(msg="%s" % stderr)
else:
module.exit_json(changed=True, db=db, msg=stdout)
-
+
elif state == "import":
if module.check_mode:
module.exit_json(changed=True, db=db)
@@ -334,7 +334,7 @@ def main():
module.fail_json(msg="%s" % stderr)
else:
module.exit_json(changed=True, db=db, msg=stdout)
-
+
elif state == "present":
if module.check_mode:
module.exit_json(changed=False, db=db)
@@ -366,7 +366,8 @@ def main():
module.fail_json(msg="%s" % stderr)
else:
module.exit_json(changed=True, db=db, msg=stdout)
- except Exception, e:
+ except Exception:
+ e = get_exception()
module.fail_json(msg="error creating database: " + str(e))
elif state == "absent":