summaryrefslogtreecommitdiff
path: root/game/python-extra/chardet/compat.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-09 13:32:01 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-09 13:32:01 -0300
commit63afe4145f410a844c647d4e3f1059f568175c1e (patch)
tree15da6a890c78d73370f44f9fd5d59badfbbe60e4 /game/python-extra/chardet/compat.py
downloadclient-init.tar.gz
client-init.tar.bz2
client-init.tar.xz
client-init.zip
Initial commit, forked from Spheresinit
Diffstat (limited to 'game/python-extra/chardet/compat.py')
-rw-r--r--game/python-extra/chardet/compat.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/game/python-extra/chardet/compat.py b/game/python-extra/chardet/compat.py
new file mode 100644
index 0000000..ddd7468
--- /dev/null
+++ b/game/python-extra/chardet/compat.py
@@ -0,0 +1,34 @@
+######################## BEGIN LICENSE BLOCK ########################
+# Contributor(s):
+# Dan Blanchard
+# Ian Cordasco
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+######################### END LICENSE BLOCK #########################
+
+import sys
+
+
+if sys.version_info < (3, 0):
+ PY2 = True
+ PY3 = False
+ base_str = (str, unicode)
+ text_type = unicode
+else:
+ PY2 = False
+ PY3 = True
+ base_str = (bytes, str)
+ text_type = str