diff options
author | Mathieu Bridon <[email protected]> | 2018-07-06 12:13:36 +0200 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2018-07-06 10:18:43 -0700 |
commit | b39bdb07164211c483a3c8a8625689169be09cc4 (patch) | |
tree | 64f84b5851c3346213ea573c79f10ca37edceb75 /src/mapi/glapi | |
parent | e5a8d51e541376077d3ca72f00eacadab6ac0501 (diff) |
python: Stop using the Python 2 exception syntax
We could have made this compatible with Python 3 by using:
except Exception as e:
But since none of this code actually uses the exception objects, let's
just drop them entirely.
Signed-off-by: Mathieu Bridon <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Dylan Baker <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mapi/glapi')
-rw-r--r-- | src/mapi/glapi/gen/glX_XML.py | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 6 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_marshal.py | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_marshal_h.py | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/mapi/glapi/gen/glX_XML.py b/src/mapi/glapi/gen/glX_XML.py index b6d305c8797..d09370a508f 100644 --- a/src/mapi/glapi/gen/glX_XML.py +++ b/src/mapi/glapi/gen/glX_XML.py @@ -470,7 +470,7 @@ class glx_function(gl_XML.gl_function): def needs_reply(self): try: x = self._needs_reply - except Exception, e: + except Exception: x = 0 if self.return_type != 'void': x = 1 diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 3a191abe0d6..bfeacf13863 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -284,7 +284,7 @@ def classify_category(name, number): try: core_version = float(name) - except Exception,e: + except Exception: core_version = 0.0 if core_version > 0.0: @@ -365,7 +365,7 @@ class gl_enum( gl_item ): else: try: c = int(temp) - except Exception,e: + except Exception: raise RuntimeError('Invalid count value "%s" for enum "%s" in function "%s" when an integer was expected.' % (temp, self.name, n)) self.default_count = c @@ -426,7 +426,7 @@ class gl_parameter(object): count = int(c) self.count = count self.counter = None - except Exception,e: + except Exception: count = 1 self.count = 0 self.counter = c diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py index e9dd2c4f786..5b35357ac54 100644 --- a/src/mapi/glapi/gen/gl_marshal.py +++ b/src/mapi/glapi/gen/gl_marshal.py @@ -353,7 +353,7 @@ if __name__ == '__main__': try: (args, trail) = getopt.getopt(sys.argv[1:], 'm:f:') - except Exception,e: + except Exception: show_usage() for (arg,val) in args: diff --git a/src/mapi/glapi/gen/gl_marshal_h.py b/src/mapi/glapi/gen/gl_marshal_h.py index 6490595a00f..a7a9eda5731 100644 --- a/src/mapi/glapi/gen/gl_marshal_h.py +++ b/src/mapi/glapi/gen/gl_marshal_h.py @@ -74,7 +74,7 @@ if __name__ == '__main__': try: (args, trail) = getopt.getopt(sys.argv[1:], 'm:f:') - except Exception,e: + except Exception: show_usage() for (arg,val) in args: |