summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2017-02-02 15:48:19 +0100
committerMartin Basti <mbasti@redhat.com>2017-02-08 15:41:39 +0100
commitd38540acd614bcaa489023401fc8db7c02cd3892 (patch)
tree561d566aef3032d6150f05f907e07e8c7b16aa36 /ipapython
parentad1a5551d5ec716dc745f39e82d38cc634229cb0 (diff)
downloadfreeipa-d38540acd614bcaa489023401fc8db7c02cd3892.tar.gz
freeipa-d38540acd614bcaa489023401fc8db7c02cd3892.tar.xz
freeipa-d38540acd614bcaa489023401fc8db7c02cd3892.zip
py3: DN: fix BytesWarning
User repr() instead of str() for bytes, it has the same effect, but it is proper way how to print bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/dn.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipapython/dn.py b/ipapython/dn.py
index 2f7655d27..4e8c22bb0 100644
--- a/ipapython/dn.py
+++ b/ipapython/dn.py
@@ -452,7 +452,7 @@ def _adjust_indices(start, end, length):
def _normalize_ava_input(val):
if six.PY3 and isinstance(val, bytes):
- raise TypeError('expected str, got bytes: %s' % val)
+ raise TypeError('expected str, got bytes: %r' % val)
elif not isinstance(val, six.string_types):
val = val_encode(six.text_type(val))
elif six.PY2 and isinstance(val, unicode):