[Python-modules-commits] [drf-haystack] 01/17: Use io module to open UTF-8 encoded file.
Michael Fladischer
fladi at moszumanska.debian.org
Sat Jan 2 17:45:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch master
in repository drf-haystack.
commit 4d00cafe4f86f036c08905dd8a0d0b0137e58932
Author: Michael Fladischer <fladi at debian.org>
Date: Fri Nov 13 08:25:39 2015 +0100
Use io module to open UTF-8 encoded file.
Forwarded: no
Last-Update: 2015-08-30
Patch-Name: python3-io.patch
---
setup.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 4ab8eb3..f192db9 100644
--- a/setup.py
+++ b/setup.py
@@ -2,6 +2,7 @@
import re
import os
+import io
try:
from setuptools import setup
@@ -15,7 +16,7 @@ def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
- init_py = open(os.path.join(package, "__init__.py")).read()
+ init_py = io.open(os.path.join(package, "__init__.py"), encoding='utf-8').read()
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
setup(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/drf-haystack.git
More information about the Python-modules-commits
mailing list