mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
First round of Python 3 compatibility fixes.
This commit is contained in:
committed by
Dave Page
parent
da6043e7a5
commit
209ee78b25
@@ -111,9 +111,12 @@ class Connection(BaseConnection):
|
||||
)
|
||||
|
||||
except psycopg2.Error as e:
|
||||
msg = e.pgerror if e.pgerror else e.message \
|
||||
if e.message else e.diag.message_detail \
|
||||
if e.diag.message_detail else str(e)
|
||||
if e.pgerror:
|
||||
msg = e.pgerror
|
||||
elif e.diag.message_detail:
|
||||
msg = e.diag.message_detail
|
||||
else:
|
||||
msg = str(e)
|
||||
|
||||
return False, msg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user