Fixed postgresql_db failing on Python 2.4 with --check

reviewable/pr18780/r1
kustodian 10 years ago
parent 2970b339eb
commit 81cbdb6c8c

@ -281,14 +281,13 @@ def main():
elif state == "present":
changed = not db_matches(cursor, db, owner, template, encoding,
lc_collate, lc_ctype)
module.exit_json(changed=changed,db=db)
if state == "absent":
changed = db_delete(cursor, db)
else:
if state == "absent":
changed = db_delete(cursor, db)
elif state == "present":
changed = db_create(cursor, db, owner, template, encoding,
lc_collate, lc_ctype)
elif state == "present":
changed = db_create(cursor, db, owner, template, encoding,
lc_collate, lc_ctype)
except NotSupportedError, e:
module.fail_json(msg=str(e))
except Exception, e:

Loading…
Cancel
Save