summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/check.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/command/check.py')
-rw-r--r--Lib/distutils/command/check.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/distutils/command/check.py b/Lib/distutils/command/check.py
index bc29baa..4b64e45 100644
--- a/Lib/distutils/command/check.py
+++ b/Lib/distutils/command/check.py
@@ -5,6 +5,7 @@ Implements the Distutils 'check' command.
__revision__ = "$Id$"
from distutils.core import Command
+from distutils.dist import PKG_INFO_ENCODING
from distutils.errors import DistutilsSetupError
try:
@@ -108,6 +109,8 @@ class check(Command):
def check_restructuredtext(self):
"""Checks if the long string fields are reST-compliant."""
data = self.distribution.get_long_description()
+ if not isinstance(data, unicode):
+ data = data.decode(PKG_INFO_ENCODING)
for warning in self._check_rst_data(data):
line = warning[-1].get('line')
if line is None: