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
|
summary = None
|
||||||
filename = docs.get('meta.summary', 'SUMMARY').strip()
|
filename = docs.get('meta.summary', 'SUMMARY').strip()
|
||||||
if filename and _os.path.isfile(filename):
|
if filename and _os.path.isfile(filename):
|
||||||
fp = open(filename)
|
fp = open(filename, encoding='utf-8')
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
summary = fp.read().strip().splitlines()[0].rstrip()
|
summary = fp.read().strip().splitlines()[0].rstrip()
|
||||||
@ -99,7 +99,7 @@ def find_description(docs):
|
|||||||
description = None
|
description = None
|
||||||
filename = docs.get('meta.description', 'DESCRIPTION').strip()
|
filename = docs.get('meta.description', 'DESCRIPTION').strip()
|
||||||
if filename and _os.path.isfile(filename):
|
if filename and _os.path.isfile(filename):
|
||||||
fp = open(filename)
|
fp = open(filename, encoding='utf-8')
|
||||||
try:
|
try:
|
||||||
description = fp.read().rstrip()
|
description = fp.read().rstrip()
|
||||||
finally:
|
finally:
|
||||||
@ -125,7 +125,7 @@ def find_classifiers(docs):
|
|||||||
"""
|
"""
|
||||||
filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip()
|
filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip()
|
||||||
if filename and _os.path.isfile(filename):
|
if filename and _os.path.isfile(filename):
|
||||||
fp = open(filename)
|
fp = open(filename, encoding='utf-8')
|
||||||
try:
|
try:
|
||||||
content = fp.read()
|
content = fp.read()
|
||||||
finally:
|
finally:
|
||||||
@ -144,7 +144,7 @@ def find_provides(docs):
|
|||||||
"""
|
"""
|
||||||
filename = docs.get('meta.provides', 'PROVIDES').strip()
|
filename = docs.get('meta.provides', 'PROVIDES').strip()
|
||||||
if filename and _os.path.isfile(filename):
|
if filename and _os.path.isfile(filename):
|
||||||
fp = open(filename)
|
fp = open(filename, encoding='utf-8')
|
||||||
try:
|
try:
|
||||||
content = fp.read()
|
content = fp.read()
|
||||||
finally:
|
finally:
|
||||||
@ -163,7 +163,7 @@ def find_license(docs):
|
|||||||
"""
|
"""
|
||||||
filename = docs.get('meta.license', 'LICENSE').strip()
|
filename = docs.get('meta.license', 'LICENSE').strip()
|
||||||
if filename and _os.path.isfile(filename):
|
if filename and _os.path.isfile(filename):
|
||||||
fp = open(filename)
|
fp = open(filename, encoding='utf-8')
|
||||||
try:
|
try:
|
||||||
return fp.read().rstrip()
|
return fp.read().rstrip()
|
||||||
finally:
|
finally:
|
||||||
@ -338,7 +338,7 @@ def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0):
|
|||||||
ext = []
|
ext = []
|
||||||
|
|
||||||
cfg = _util.SafeConfigParser()
|
cfg = _util.SafeConfigParser()
|
||||||
cfg.read(config)
|
cfg.read(config, encoding='utf-8')
|
||||||
pkg = dict(cfg.items('package'))
|
pkg = dict(cfg.items('package'))
|
||||||
python_min = pkg.get('python.min') or None
|
python_min = pkg.get('python.min') or None
|
||||||
python_max = pkg.get('python.max') or None
|
python_max = pkg.get('python.max') or None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user