Commit Graph

5 Commits (a9f5837157a2c468cac4fa4ec5c1c4c398600aef)

Author SHA1 Message Date
Toshio Kuratomi a526eae543 Clean up a few more pyflakes warnings 2015-10-19 11:20:21 -07:00
Marius Gedminas ab569cea22 Move to_str alias into ansible.utils.unicode
@abadger suggested on IRC that it's useful enough to go into
ansible.utils.unicode.
2015-10-15 10:27:38 +03:00
Marius Gedminas ca826508d9 Python 3: fix AnsibleError formatting
If you convert the error string to bytes and embed it inside another
error string, you get

  Prefix:

  b'Embedded\nerror\nstring'

which is not what we want.

But we also don't want Unicode in error messages causing unexpected
UnicodeEncodeErrors when on Python 2.

So let's convert the error message into the native string type (bytes on
Python 2, unicode on Python 3).
2015-10-15 09:38:14 +03:00
James Cammarata de792ba3c2 Improve handling of unicode errors
Fixes #12669
2015-10-08 10:04:15 -04:00
James Cammarata ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00