try fixing the issue presented in https://github.com/ndparker/rjsmin/pull/2
This commit is contained in:
parent
7b9e720034
commit
dd237bb395
@ -87,7 +87,7 @@ def find_description(docs):
|
||||
summary = None
|
||||
filename = docs.get('meta.summary', 'SUMMARY').strip()
|
||||
if filename and _os.path.isfile(filename):
|
||||
fp = open(filename)
|
||||
fp = open(filename, encoding='utf-8')
|
||||
try:
|
||||
try:
|
||||
summary = fp.read().strip().splitlines()[0].rstrip()
|
||||
@ -99,7 +99,7 @@ def find_description(docs):
|
||||
description = None
|
||||
filename = docs.get('meta.description', 'DESCRIPTION').strip()
|
||||
if filename and _os.path.isfile(filename):
|
||||
fp = open(filename)
|
||||
fp = open(filename, encoding='utf-8')
|
||||
try:
|
||||
description = fp.read().rstrip()
|
||||
finally:
|
||||
@ -125,7 +125,7 @@ def find_classifiers(docs):
|
||||
"""
|
||||
filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip()
|
||||
if filename and _os.path.isfile(filename):
|
||||
fp = open(filename)
|
||||
fp = open(filename, encoding='utf-8')
|
||||
try:
|
||||
content = fp.read()
|
||||
finally:
|
||||
@ -144,7 +144,7 @@ def find_provides(docs):
|
||||
"""
|
||||
filename = docs.get('meta.provides', 'PROVIDES').strip()
|
||||
if filename and _os.path.isfile(filename):
|
||||
fp = open(filename)
|
||||
fp = open(filename, encoding='utf-8')
|
||||
try:
|
||||
content = fp.read()
|
||||
finally:
|
||||
@ -163,7 +163,7 @@ def find_license(docs):
|
||||
"""
|
||||
filename = docs.get('meta.license', 'LICENSE').strip()
|
||||
if filename and _os.path.isfile(filename):
|
||||
fp = open(filename)
|
||||
fp = open(filename, encoding='utf-8')
|
||||
try:
|
||||
return fp.read().rstrip()
|
||||
finally:
|
||||
@ -338,7 +338,7 @@ def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0):
|
||||
ext = []
|
||||
|
||||
cfg = _util.SafeConfigParser()
|
||||
cfg.read(config)
|
||||
cfg.read(config, encoding='utf-8')
|
||||
pkg = dict(cfg.items('package'))
|
||||
python_min = pkg.get('python.min') or None
|
||||
python_max = pkg.get('python.max') or None
|
||||
|
Loading…
x
Reference in New Issue
Block a user