mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
src/registry.py: Fix encoding issues with Python 3.
This commit is contained in:
parent
d4f5c03b3f
commit
f1165333e5
@ -113,7 +113,7 @@ def close(registry, filename, private=True):
|
||||
for (name, value) in registry.getValues(getChildren=True):
|
||||
help = value.help()
|
||||
if help:
|
||||
lines = textwrap.wrap(value._help.encode('utf8', errors='replace'))
|
||||
lines = textwrap.wrap(value._help)
|
||||
for (i, line) in enumerate(lines):
|
||||
lines[i] = '# %s\n' % line
|
||||
lines.insert(0, '###\n')
|
||||
@ -374,7 +374,7 @@ class Value(Group):
|
||||
return repr(self())
|
||||
|
||||
def serialize(self):
|
||||
return encoder(str(self))[0]
|
||||
return encoder(str(self))[0].decode()
|
||||
|
||||
# We tried many, *many* different syntactic methods here, and this one was
|
||||
# simply the best -- not very intrusive, easily overridden by subclasses,
|
||||
|
Loading…
Reference in New Issue
Block a user