mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -06:00
Py3: Replace six.bytes_type with bytes
See: https://pagure.io/freeipa/issue/7715 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
1 parent
61156b0a50
commit
ed967ec24d
2 files changed
+3
-3
No files matched your search
@@ -1439,13 +1439,13 @@ if six.PY2:
|
||||
Decode argument using the file system encoding, as returned by
|
||||
`sys.getfilesystemencoding()`.
|
||||
"""
|
||||
if isinstance(value, six.binary_type):
|
||||
if isinstance(value, bytes):
|
||||
return value.decode(sys.getfilesystemencoding())
|
||||
elif isinstance(value, str):
|
||||
return value
|
||||
else:
|
||||
raise TypeError("expect {0} or {1}, not {2}".format(
|
||||
six.binary_type.__name__,
|
||||
bytes.__name__,
|
||||
str.__name__,
|
||||
type(value).__name__))
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user