Get rid of logentries.to_unicode.

It wasn't doing anything that a literal couldn't do and used
unicode_escape which only understands latin1 (The author of the code
seems to have thought it took an encoding argument but it looks like
that was silently ignored.)
pull/15689/head
Toshio Kuratomi 9 years ago
parent aec74b4b65
commit f39ad1f13a

@ -78,10 +78,6 @@ except ImportError:
from ansible.plugins.callback import CallbackBase
def to_unicode(ch):
return codecs.unicode_escape_decode(ch)[0]
def is_unicode(ch):
return isinstance(ch, unicode)
@ -106,7 +102,7 @@ class PlainTextSocketAppender(object):
self.INVALID_TOKEN = ("\n\nIt appears the LOGENTRIES_TOKEN "
"parameter you entered is incorrect!\n\n")
# Unicode Line separator character \u2028
self.LINE_SEP = to_unicode('\u2028')
self.LINE_SEP = u'\u2028'
self.verbose = verbose
self._conn = None

Loading…
Cancel
Save