Skip to content

Commit

Permalink
add generic message to remove_credentials in case of unanticipated er…
Browse files Browse the repository at this point in the history
…ror format
  • Loading branch information
jason-upchurch authored and lbeaufort committed Jun 24, 2019
1 parent ae0cde1 commit 6d3809e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jdbc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ def get_jdbc_credentials(dbi_url):


def remove_credentials(error):
return re.sub(r"\(.*", "", error)
message = "ERROR:"
if '(' in error:
message = error.split('(')[0]
return message

0 comments on commit 6d3809e

Please sign in to comment.