diff options
author | Lumir Balhar <lbalhar@redhat.com> | 2018-02-09 20:49:36 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-02-15 00:18:29 +0100 |
commit | cb15e32f85f7a69dff0e461ec3536a84e95407ca (patch) | |
tree | 24945044e45aecd7ba5338008c231e1e7ab39e1f /python/samba/compat.py | |
parent | 7ee74f66a1715b2c88165f025ebc3b661f15c75d (diff) | |
download | samba-cb15e32f85f7a69dff0e461ec3536a84e95407ca.tar.gz |
python: Add `text_type` Python 2/3 compatible function name.
This compatible function name represents `str` in Python 3
and `unicode` in Python 2.
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/compat.py')
-rw-r--r-- | python/samba/compat.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/samba/compat.py b/python/samba/compat.py index dfdfb7dd81e..667a1a443b1 100644 --- a/python/samba/compat.py +++ b/python/samba/compat.py @@ -23,5 +23,7 @@ PY3 = sys.version_info[0] == 3 if PY3: integer_types = int, + text_type = str else: integer_types = (int, long) + text_type = unicode |