[Pkg-mpd-commits] [python-mpd] 207/262: fix setup.py with with non-unicode locale

Simon McVittie smcv at debian.org
Sun May 22 18:16:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch upstream
in repository python-mpd.

commit a3dba351c65040ff260ad85b593eb085bf1f5663
Author: Maxim Koltsov <maksbotan at gentoo.org>
Date:   Fri Apr 26 07:07:47 2013 +0200

    fix setup.py with with non-unicode locale
---
 setup.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 06e8d07..a56756b 100644
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,9 @@ from setuptools.command.test import test as TestCommand
 import sys,os
 import mpd
 
+if sys.version_info[0] == 2:
+    from io import open
+
 CLASSIFIERS = [
     "Development Status :: 5 - Production/Stable",
     "Intended Audience :: Developers",
@@ -45,7 +48,7 @@ class Tox(TestCommand):
         sys.exit(errno)
 
 def read(fname):
-    return open(os.path.join(os.path.dirname(__file__), fname)).read()
+    return open(os.path.join(os.path.dirname(__file__),  fname),  encoding="utf8").read()
 
 VERSION = ".".join(map(str, mpd.VERSION))
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git



More information about the Pkg-mpd-commits mailing list