Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
5 errors
  • Loading branch information
escapewindow committed Jul 1, 2016
1 parent 2df1e57 commit 9246b28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configman/value_sources/for_configobj.py
Expand Up @@ -209,7 +209,7 @@ def _write_ini(source_dict, namespace_name=None, level=0, indent_size=4,
print("%s# %s" % (indent_spacer, an_option.doc),
file=output_stream)
option_value = str(an_option)
if isinstance(option_value, six.text_type):
if six.PY2 and isinstance(option_value, six.text_type):
option_value = option_value.encode('utf8')

if an_option.reference_value_from:
Expand All @@ -227,7 +227,7 @@ def _write_ini(source_dict, namespace_name=None, level=0, indent_size=4,
else:
option_format = '%s#%s=%s\n'

if isinstance(option_value, (six.binary_type, six.text_type)) and \
if isinstance(option_value, (six.text_type, six.binary_type)) and \
',' in option_value:
# quote lists unless they're already quoted
if option_value[0] not in '\'"':
Expand Down

0 comments on commit 9246b28

Please sign in to comment.