mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06: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:
@@ -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