28 lines
1.0 KiB
Diff
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):
|