mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 07:16:52 -06:00
Handle SQL_ASCII databases when running test cases.
* Handle cases when psycopg returns bytes instead of a string. See https://github.com/psycopg/psycopg/issues/561 * A more appropriate fix, suggested by Daniele Varrazzo * Fix typo. * Re-think this check. Our own driver effectively monkey-patches the psycopg encoding mappings.
This commit is contained in:
parent
c067289012
commit
8ea3346a9d
@ -1186,6 +1186,10 @@ def get_server_type(server):
|
||||
if isinstance(version_string, tuple):
|
||||
version_string = version_string[0]
|
||||
|
||||
# Handle SQL_ASCII (https://github.com/psycopg/psycopg/issues/561)
|
||||
version_string = version_string.decode() if \
|
||||
hasattr(version_string, 'decode') else version_string
|
||||
|
||||
if "EnterpriseDB" in version_string:
|
||||
return 'ppas'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user