diff options
author | Sijis Aviles <sijis.aviles@gmail.com> | 2016-10-29 11:12:02 -0500 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2016-10-29 09:12:39 -0700 |
commit | 219a20277fbf2c1b92f9068bdade6caddcf3f612 (patch) | |
tree | 6ed7b2e0921b65de64d28202622da7d3dc5cb34f | |
parent | 3de9d8373b4ce7253ae3113939ad56bf5118286c (diff) | |
download | ansible-219a20277fbf2c1b92f9068bdade6caddcf3f612.tar.gz |
Simplify surrogate check in to_text() (#18211)
* Simplify surrogate check in to_text()
* Simplify surrogateescape check even further
(cherry picked from commit b365f44fa1e51e13fadacc8fdf7b14aa1be01452)
-rw-r--r-- | lib/ansible/module_utils/_text.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/ansible/module_utils/_text.py b/lib/ansible/module_utils/_text.py index cf075e3bb4..173bbf4a9d 100644 --- a/lib/ansible/module_utils/_text.py +++ b/lib/ansible/module_utils/_text.py @@ -173,12 +173,6 @@ def to_text(obj, encoding='utf-8', errors=None, nonstring='simplerepr'): else: errors = 'strict' - if errors is None: - if PY3: - errors = 'surrogateescape' - else: - errors = 'replace' - if isinstance(obj, binary_type): return obj.decode(encoding, errors) |