Skip to content

Commit

Permalink
fix pretty unicode in python2.
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro authored and francesconazzaro committed Jan 19, 2017
1 parent d7f949d commit 1a2c405
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mariobros/mario.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

def pretty_unicode(obj):
"""Filter to pretty print iterables."""
if not isinstance(obj, str):
if not isinstance(obj, (str, bytes)):
try:
return ' '.join(str(item) for item in obj)
except TypeError:
Expand Down Expand Up @@ -276,7 +276,7 @@ def register_tasks(namespaces, default_namespace={}, dry_run_suffix=''):


def print_namespaces(default_namespace, section_namespaces):
"""Print namespaces with the Mariofile format.
"""Print namespaces with the MarioFile format.
:param dict default_namespace: Default namespace dictionary.
:param dict section_namespaces: Section namespaces dictionary.
Expand All @@ -290,7 +290,7 @@ def print_namespaces(default_namespace, section_namespaces):


def render_config(section_namespaces):
"""Parse and render a Mariofile.
"""Parse and render a MarioFile.
:param dict section_namespaces: Section namespaces dictionary.
:return: (dict, dict, dict)
Expand Down

0 comments on commit 1a2c405

Please sign in to comment.