summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSijis Aviles <sijis.aviles@gmail.com>2016-10-29 11:12:02 -0500
committerToshio Kuratomi <a.badger@gmail.com>2016-10-29 09:12:39 -0700
commit219a20277fbf2c1b92f9068bdade6caddcf3f612 (patch)
tree6ed7b2e0921b65de64d28202622da7d3dc5cb34f
parent3de9d8373b4ce7253ae3113939ad56bf5118286c (diff)
downloadansible-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.py6
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)