diff options
author | Marius Gedminas <marius@gedmin.as> | 2015-10-15 10:27:38 +0300 |
---|---|---|
committer | Marius Gedminas <marius@gedmin.as> | 2015-10-15 10:27:38 +0300 |
commit | ab569cea2253fd70bc8b3f0a2540ac0d075e8c4a (patch) | |
tree | 0ddc51d188fde532ec9874a5ded2d45a30e72d48 /lib/ansible/errors | |
parent | ca826508d992f99ab6cba75d03a34b804448dfef (diff) | |
download | ansible-ab569cea2253fd70bc8b3f0a2540ac0d075e8c4a.tar.gz |
Move to_str alias into ansible.utils.unicode
@abadger suggested on IRC that it's useful enough to go into
ansible.utils.unicode.
Diffstat (limited to 'lib/ansible/errors')
-rw-r--r-- | lib/ansible/errors/__init__.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/ansible/errors/__init__.py b/lib/ansible/errors/__init__.py index c88f2bb864..d8f6a61c97 100644 --- a/lib/ansible/errors/__init__.py +++ b/lib/ansible/errors/__init__.py @@ -20,15 +20,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.errors.yaml_strings import * -from ansible.utils.unicode import to_unicode, to_bytes - - -if str is bytes: - # Python 2 - to_str = to_bytes -else: - # Python 3 - to_str = to_unicode +from ansible.utils.unicode import to_unicode, to_str class AnsibleError(Exception): |