File avoid_unicode_error.patch of Package python-httpretty.17576

--- setup.py.orig
+++ setup.py
@@ -27,6 +27,7 @@
 import ast
 import os
 import re
+import sys
 from setuptools import setup, find_packages
 
 
@@ -73,10 +74,12 @@ def parse_requirements(path):
 
     return pkgs, links
 
-
-local_file = lambda *f: \
-    open(os.path.join(os.path.dirname(__file__), *f)).read()
-
+if int(sys.version[0]) < 3:
+    local_file = lambda *f: \
+        open(os.path.join(os.path.dirname(__file__), *f)).read()
+else:
+    local_file = lambda *f: \
+        open(os.path.join(os.path.dirname(__file__), *f), encoding='utf-8').read()
 
 install_requires, dependency_links = \
     parse_requirements('requirements.txt')
openSUSE Build Service is sponsored by