mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-26 07:00:07 -05:00
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>
This commit is contained in:
1 parent
ad1a5551d5
commit
d38540acd6
1 file changed
+1
-1
+1
-1
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user