config: Ensure format only produces bytes

This commit is contained in:
Thomas Adamcik 2013-04-16 23:51:21 +02:00
parent 10f0632239
commit c35dfb3610

View File

@ -113,10 +113,10 @@ def _format(config, comments, schemas, display):
serialized = schema.serialize(config.get(schema.name, {}), display=display)
if not serialized:
continue
output.append(b'[%s]' % schema.name)
output.append(b'[%s]' % bytes(schema.name))
for key, value in serialized.items():
comment = comments.get(schema.name, {}).get(key, b'')
output.append(b'%s =' % key)
comment = bytes(comments.get(schema.name, {}).get(key, ''))
output.append(b'%s =' % bytes(key))
if value is not None:
output[-1] += b' ' + value
if comment: