summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-04-24 16:28:41 +0100
committerNoel Power <npower@samba.org>2018-04-30 15:43:19 +0200
commitcbd6786c0471782024750b85b6f4fbf42977c81b (patch)
tree8394cd484fe7a114c3a445ab71acc108562f4d3b /python
parentd331ddf47f7b0ee360a8c7a61e0b38d279ecbd48 (diff)
downloadsamba-cbd6786c0471782024750b85b6f4fbf42977c81b.tar.gz
python/samba: Add binary_type for p2/p3 testing.
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>
Diffstat (limited to 'python')
-rw-r--r--python/samba/compat.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/samba/compat.py b/python/samba/compat.py
index 5662095fed5..042fc86a440 100644
--- 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