summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/cloud/rackspace/rax_cdb_database.py
diff options
context:
space:
mode:
author@ <@>2016-06-03 06:39:59 -0700
committerMatt Clay <matt@mystile.com>2016-12-08 11:24:34 -0500
commit7e4b1ebff5b006dd9088e0734bf647249500f5ec (patch)
treeb53000b36fee3dae0a62f58dad781d1609a6500b /lib/ansible/modules/cloud/rackspace/rax_cdb_database.py
parent7960e99310bd5f47936b82a3e416c6e2b0ac882f (diff)
downloadansible-7e4b1ebff5b006dd9088e0734bf647249500f5ec.tar.gz
Fixing Rackspace compile time errors irt exception handling for Python 3 (#3849)
Diffstat (limited to 'lib/ansible/modules/cloud/rackspace/rax_cdb_database.py')
-rw-r--r--lib/ansible/modules/cloud/rackspace/rax_cdb_database.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ansible/modules/cloud/rackspace/rax_cdb_database.py b/lib/ansible/modules/cloud/rackspace/rax_cdb_database.py
index bfd5dbbf12..45d0f24722 100644
--- a/lib/ansible/modules/cloud/rackspace/rax_cdb_database.py
+++ b/lib/ansible/modules/cloud/rackspace/rax_cdb_database.py
@@ -83,7 +83,7 @@ def save_database(module, cdb_id, name, character_set, collate):
try:
instance = cdb.get(cdb_id)
- except Exception, e:
+ except Exception as e:
module.fail_json(msg='%s' % e.message)
changed = False
@@ -95,7 +95,7 @@ def save_database(module, cdb_id, name, character_set, collate):
database = instance.create_database(name=name,
character_set=character_set,
collate=collate)
- except Exception, e:
+ except Exception as e:
module.fail_json(msg='%s' % e.message)
else:
changed = True
@@ -109,7 +109,7 @@ def delete_database(module, cdb_id, name):
try:
instance = cdb.get(cdb_id)
- except Exception, e:
+ except Exception as e:
module.fail_json(msg='%s' % e.message)
changed = False
@@ -119,7 +119,7 @@ def delete_database(module, cdb_id, name):
if database:
try:
database.delete()
- except Exception, e:
+ except Exception as e:
module.fail_json(msg='%s' % e.message)
else:
changed = True