summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-01-23 19:08:57 -0500
committerJason R. Coombs <jaraco@jaraco.com>2016-01-23 19:08:57 -0500
commit7135e646807d607edd684db8555407dfb6ea7382 (patch)
treec4c10f2ccb94cf3bbbfbbf619a61fd9c401981b9
parent0d02d0716a4ef1ebc139fd12294a641dd95b85f8 (diff)
downloadpython-setuptools-bitbucket-7135e646807d607edd684db8555407dfb6ea7382.tar.gz
Avoid TypeError when getfilesystemencoding returns None. Fixes #486.HEADmaster
-rw-r--r--CHANGES.txt6
-rw-r--r--setuptools/unicode_utils.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index c7f68ab4..11298b57 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,12 @@
CHANGES
=======
+19.4.2
+------
+
+* Issue #486: Correct TypeError when getfilesystemencoding
+ returns None.
+
19.4.1
------
diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py
index 6eee6351..ffab3e24 100644
--- a/setuptools/unicode_utils.py
+++ b/setuptools/unicode_utils.py
@@ -25,7 +25,7 @@ def filesys_decode(path):
if isinstance(path, six.text_type):
return path
- fs_enc = sys.getfilesystemencoding()
+ fs_enc = sys.getfilesystemencoding() or 'utf-8'
candidates = fs_enc, 'utf-8'
for enc in candidates: