summaryrefslogtreecommitdiffstats
path: root/package/evemu/evemu-0006-Description-fixes-the-syntax-for-raising-exceptions-.patch
blob: cf3da8bd93fe97759d66224a715ab9e377bfd4c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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):
OpenPOWER on IntegriCloud