diff options
author | Tristan Seligmann <mithrandi@mithrandi.net> | 2016-02-21 22:44:04 +0200 |
---|---|---|
committer | Tristan Seligmann <mithrandi@mithrandi.net> | 2016-02-21 22:44:04 +0200 |
commit | cc7e801a5bfb7e276585349cc878259d4cb71c56 (patch) | |
tree | 8278c1520934e51b7680ab156458a4491e79c9b8 /src/service_identity/_compat.py |
Import python-service-identity_16.0.0.orig.tar.gz.
Diffstat (limited to 'src/service_identity/_compat.py')
-rw-r--r-- | src/service_identity/_compat.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/service_identity/_compat.py b/src/service_identity/_compat.py new file mode 100644 index 0000000..65febe8 --- /dev/null +++ b/src/service_identity/_compat.py @@ -0,0 +1,15 @@ +""" +Avoid depending on any particular Python 3 compatibility approach. +""" + +import sys + + +PY3 = sys.version_info[0] == 3 +if PY3: # pragma: nocover + maketrans = bytes.maketrans + text_type = str +else: # pragma: nocover + import string + maketrans = string.maketrans + text_type = unicode # noqa |