git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d331ddf
)
python/samba: Add binary_type for p2/p3 testing.
author
Noel Power
<noel.power@suse.com>
Tue, 24 Apr 2018 15:28:41 +0000
(16:28 +0100)
committer
Noel Power
<npower@samba.org>
Mon, 30 Apr 2018 13:43:19 +0000
(15:43 +0200)
For helping test for binary types, binary_type evaluates to 'str'
in py2, and 'bytes' in py3.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
python/samba/compat.py
patch
|
blob
|
history
diff --git
a/python/samba/compat.py
b/python/samba/compat.py
index 5662095fed527f9159b625c495c28a2536a7d769..042fc86a44040f2643b14252f88c4aa290439689 100644
(file)
--- a/
python/samba/compat.py
+++ b/
python/samba/compat.py
@@
-30,6
+30,7
@@
if PY3:
integer_types = int,
string_types = str
text_type = str
+ binary_type = bytes
# alias
import io
@@
-43,6
+44,7
@@
else:
integer_types = (int, long)
string_types = basestring
text_type = unicode
+ binary_type = str
# alias
import StringIO