Merge pull request #328 from chrismeyersfsu/fix-ansi

fixes stdout formats unicode problem
This commit is contained in:
Chris Meyers 2015-07-31 14:51:55 -04:00
commit 397158e847
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@ Local versions of third-party packages required by Tower. Package names and
versions are listed below, along with notes on which files are included.
amqp==1.4.5 (amqp/*)
ansiconv==1.0.0 (ansiconv.py)
ansiconv==1.0.0 (ansiconv.py, small fix, generate unicode html)
anyjson==0.3.3 (anyjson/*)
apache-libcloud==0.15.1 (libcloud/*)
argparse==1.2.1 (argparse.py, needed for Python 2.6 support)

View File

@ -122,6 +122,7 @@ def _block_to_html(text):
classes.append('ansi{0}'.format(code))
if classes:
text = '<span class="{0}">{1}</span>'.format(' '.join(classes), text)
text = u'<span class="{0}">{1}</span>'.format(' '.join(classes), text)
return command, text