mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* postgresql_db dump does not fail on FATAL error when using compression
This commit is contained in:
parent
90c3337316
commit
731bf1b11d
1 changed files with 3 additions and 0 deletions
|
@ -460,6 +460,9 @@ def main():
|
|||
module.fail_json(msg=to_native(e), exception=traceback.format_exc())
|
||||
|
||||
elif state in ("dump", "restore"):
|
||||
if not db_exists(cursor, db) and state == "dump":
|
||||
module.fail_json(
|
||||
msg="database \"{db}\" does not exist".format(db=db))
|
||||
method = state == "dump" and db_dump or db_restore
|
||||
try:
|
||||
rc, stdout, stderr, cmd = method(module, target, target_opts, db, **kw)
|
||||
|
|
Loading…
Reference in a new issue