summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-08-12 11:34:45 +1000
committerBenjamin Tissoires <benjamin.tissoires@gmail.com>2014-08-12 13:53:45 -0400
commita8984a2c778ffe6c043b09847156567a114cee0f (patch)
treeb05eb810cb0f072b5aea2e92317cc062ee721f99 /python
parenta21bd8cce9fb20a4128db76945d4de3cac3721b4 (diff)
python: hardcode the encoding in the two places we need it
Prep work for being able to deprecate evemu.const. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Diffstat (limited to 'python')
-rw-r--r--python/evemu/__init__.py3
-rw-r--r--python/evemu/base.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/python/evemu/__init__.py b/python/evemu/__init__.py
index 204fa38..bc53093 100644
--- a/python/evemu/__init__.py
+++ b/python/evemu/__init__.py
@@ -26,7 +26,6 @@ import stat
import tempfile
import evemu.base
-import evemu.const
import evemu.event_names
__all__ = ["Device",
@@ -272,7 +271,7 @@ class Device(object):
Gets the name of the input device (as reported by the device).
"""
result = self._libevemu.evemu_get_name(self._evemu_device)
- return result.decode(evemu.const.ENCODING)
+ return result.decode("iso8859-1")
@property
def id_bustype(self):
diff --git a/python/evemu/base.py b/python/evemu/base.py
index fc66869..5cca150 100644
--- a/python/evemu/base.py
+++ b/python/evemu/base.py
@@ -26,7 +26,7 @@ def raise_error_if(raise_error, result, func, args):
for (num, arg) in enumerate(func.argtypes):
# convert args to str for readable output
if arg == c_char_p:
- strargs.append('"%s"' % args[num].decode(evemu.const.ENCODING))
+ strargs.append('"%s"' % args[num].decode("iso8859-1"))
elif arg == c_void_p:
strargs.append(hex(int(args[num])))
else: