mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
[Python 3 compability] decode function used in 'needsQuoting' function
is not available on Python 3.
This commit is contained in:
parent
eed1590a51
commit
b309b1ffb8
@ -797,8 +797,12 @@ class Driver(BaseDriver):
|
||||
@staticmethod
|
||||
def needsQuoting(key, forTypes):
|
||||
|
||||
# Python 3 does not require the decoding of value
|
||||
if hasattr(str, 'decode'):
|
||||
value = key.decode()
|
||||
valNoArray = value.decode()
|
||||
else:
|
||||
value = key
|
||||
valNoArray = value
|
||||
|
||||
# check if the string is number or not
|
||||
if (isinstance(value, int)):
|
||||
|
Loading…
Reference in New Issue
Block a user