buildrootschalter/package/evemu/evemu-0006-Description-fixes-the-syntax-for-raising-exceptions-.patch
Peter Seiderer 3d08f3f03f evemu: enable python3 bindings
Add evemu/python3 related patches:
- fix python/evemu/base.py for python3 (add patch from [1])
- fix python3 binding runtime failure

[1] http://ftp.de.debian.org/debian/pool/main/e/evemu/evemu_1.2.0-2.debian.tar.xz

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-21 22:37:19 +02:00

28 lines
1.0 KiB
Diff

Description: fixes the syntax for raising exceptions to be Python2 and Python3
acceptable.
Author: Stephen M. Webb
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706155
--- a/python/evemu/base.py
+++ b/python/evemu/base.py
@@ -19,15 +19,15 @@
def _call0(self, api_call, *parameters):
result = api_call(*parameters)
if result == 0 and self.get_c_errno() != 0:
- raise exception.ExecutionError, "%s: %s" % (
- api_call.__name__, self.get_c_error())
+ raise exception.ExecutionError("%s: %s" % (
+ api_call.__name__, self.get_c_error()))
return result
def _call(self, api_call, *parameters):
result = api_call(*parameters)
if result < 0 and self.get_c_errno() != 0:
- raise exception.ExecutionError, "%s: %s" % (
- api_call.__name__, self.get_c_error())
+ raise exception.ExecutionError("%s: %s" % (
+ api_call.__name__, self.get_c_error()))
return result
def get_c_errno(self):