Skip to content

Commit

Permalink
Fix unicode reference
Browse files Browse the repository at this point in the history
  • Loading branch information
swalkinshaw committed Dec 2, 2018
1 parent 0771017 commit e7f7ebb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/trellis/utils/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from ansible import __version__
from ansible.module_utils._text import to_text
from ansible.module_utils.six import string_types

def system(vagrant_version=None):
# Get most recent Trellis CHANGELOG entry
Expand Down Expand Up @@ -89,7 +90,7 @@ def display(obj, result):
# Must pass unicode strings to Display.display() to prevent UnicodeError tracebacks
if isinstance(msg, list):
msg = '\n'.join([to_text(x) for x in msg])
elif not isinstance(msg, unicode):
elif not isinstance(msg, string_types):
msg = to_text(msg)

# Wrap text
Expand Down

0 comments on commit e7f7ebb

Please sign in to comment.