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:
Daniele Varrazzo 2011-06-04 22:26:21 +01:00
parent a0d16fcfb2
commit dcc9e84a68

View File

@ -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