summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 6f06ad1..f155119 100644
--- a/setup.py
+++ b/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