From: Noel Power Date: Tue, 24 Apr 2018 15:28:41 +0000 (+0100) Subject: python/samba: Add binary_type for p2/p3 testing. X-Git-Tag: ldb-1.4.0~507 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbd6786c0471782024750b85b6f4fbf42977c81b;p=thirdparty%2Fsamba.git 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 --- 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