Skip to content

Commit

Permalink
Codechange: Remove apparently redundant try block
Browse files Browse the repository at this point in the history
  • Loading branch information
LordAro committed Oct 3, 2020
1 parent 44d8d55 commit ad65941
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions webtranslate/users/redmine.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,9 @@ def connect():
db_connection.set_client_encoding("UTF-8")

if db_schema is not None and db_schema != "":
try:
cur = db_connection.cursor()
cur.execute("SET search_path TO %s", (db_schema,))
db_connection.commit()
except KeyError:
pass
cur = db_connection.cursor()
cur.execute("SET search_path TO %s", (db_schema,))
db_connection.commit()

return True

Expand Down

0 comments on commit ad65941

Please sign in to comment.