postgresql_user: fix test errors on newer Fedora versions (#47166)

This commit is contained in:
Jordan Borean 2018-10-17 14:01:11 +10:00 committed by GitHub
parent f720499337
commit dd46f953f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 12 deletions

View file

@ -406,6 +406,8 @@ def user_alter(db_connection, module, user, password, role_attr_flags, encrypted
return changed
else:
raise psycopg2.InternalError(e)
except psycopg2.NotSupportedError as e:
module.fail_json(msg=e.pgerror, exception=traceback.format_exc())
elif no_password_changes and role_attr_flags != '':
# Grab role information from pg_roles instead of pg_authid