[Python-modules-commits] [drf-haystack] 03/10: Use io module to open UTF-8 encoded file.
Michael Fladischer
fladi at moszumanska.debian.org
Tue Mar 21 12:13:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch experimental
in repository drf-haystack.
commit c715d20dbd43bd24ac14d37639cdd3932c0d54c9
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 9c7d9a3..c8e4bb7 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