Material: Fixed py3/import issues

This commit is contained in:
Yorik van Havre
2018-12-29 14:40:25 -02:00
parent 195c530c00
commit 91a61d4813
2 changed files with 11 additions and 9 deletions

View File

@@ -95,7 +95,10 @@ def read(filename):
if not line[0] in ";#[":
k = line.split("=")
if len(k) == 2:
d[k[0].strip()] = k[1].strip().decode('utf-8')
v = k[1].strip()
if hasattr(v,"decode"):
v = v.decode('utf-8')
d[k[0].strip()] = v
l += 1
return d