mirror of
https://github.com/samba-team/samba.git
synced 2025-07-21 12:59:09 +03:00
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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user