mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +03:00
Don't encode the pg_config path on Python 3 on Windows
It can deal with unicode ok, and fails if it gets bytes.
This commit is contained in:
parent
a0d16fcfb2
commit
dcc9e84a68
6
setup.py
6
setup.py
|
@ -387,10 +387,10 @@ or with the pg_config option in 'setup.cfg'.
|
|||
)
|
||||
# Support unicode paths, if this version of Python provides the
|
||||
# necessary infrastructure:
|
||||
if hasattr(sys, 'getfilesystemencoding'):
|
||||
if sys.version_info[0] < 3 \
|
||||
and hasattr(sys, 'getfilesystemencoding'):
|
||||
pg_config_path = pg_config_path.encode(
|
||||
sys.getfilesystemencoding()
|
||||
)
|
||||
sys.getfilesystemencoding())
|
||||
|
||||
return pg_config_path
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user