From cbd6786c0471782024750b85b6f4fbf42977c81b Mon Sep 17 00:00:00 2001 From: Noel Power Date: Tue, 24 Apr 2018 16:28:41 +0100 Subject: [PATCH] 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 Reviewed-by: Alexander Bokovoy --- python/samba/compat.py | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.47.2