Decode unicode strings to ascii strings when loading the manifest json file. Fixes https://github.com/kripken/emscripten/issues/3147
This commit is contained in:
5
emsdk
5
emsdk
@@ -670,7 +670,10 @@ class Tool:
|
||||
def __init__(self, data):
|
||||
# Convert the dictionary representation of the tool in 'data' to members of this class for convenience.
|
||||
for key in data:
|
||||
setattr(self, key, data[key])
|
||||
if isinstance(data[key], unicode):
|
||||
setattr(self, key, data[key].encode('Latin-1'))
|
||||
else:
|
||||
setattr(self, key, data[key])
|
||||
|
||||
def __str__(self):
|
||||
s = self.id + '-' + self.version
|
||||
|
||||
Reference in New Issue
Block a user