ansible/ansible-modules-core — pull request #281 by kustodian (2014-11-06 08:51:53+00:00)
Title: Fixed postgresql_db failing on Python 2.4 with --check

Fixed a minor bug where `postgresql_db` module fails with `--check`. This happens because on Python 2.4 (Centos 5) `module.exit_json` calls `sys.exit()` which throws an exception which is then caught by the try/except around it, so it reports an error.

This is just a minor change it the code, where I only put if/else instead of the exit_json() after the first if.