Skip to content

Commit

Permalink
Decode data instead of Python specific open calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastic authored and karimbahgat committed Nov 7, 2018
1 parent e1983dc commit 1e8838d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions setup.py
@@ -1,16 +1,11 @@
import codecs
import sys

from setuptools import setup


PYTHON3 = sys.version_info[0] == 3

def read_file(file):
if PYTHON3:
return open(file, encoding='utf-8').read()
else:
return codecs.open(file, encoding='utf-8').read()
with open(file, 'rb') as fh:
data = fh.read()

return data.decode('utf-8')

setup(name='pyshp',
version='2.0.0',
Expand Down

0 comments on commit 1e8838d

Please sign in to comment.