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 <bochecha@daitauha.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
def needs_reply(self):
try:
x = self._needs_reply
- except Exception, e:
+ except Exception:
x = 0
if self.return_type != 'void':
x = 1
try:
core_version = float(name)
- except Exception,e:
+ except Exception:
core_version = 0.0
if core_version > 0.0:
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
count = int(c)
self.count = count
self.counter = None
- except Exception,e:
+ except Exception:
count = 1
self.count = 0
self.counter = c
try:
(args, trail) = getopt.getopt(sys.argv[1:], 'm:f:')
- except Exception,e:
+ except Exception:
show_usage()
for (arg,val) in args:
try:
(args, trail) = getopt.getopt(sys.argv[1:], 'm:f:')
- except Exception,e:
+ except Exception:
show_usage()
for (arg,val) in args:
if __name__ == '__main__':
try:
(opts, args) = getopt.getopt(sys.argv[1:], "f:")
- except Exception,e:
+ except Exception:
show_usage()
if len(args) != 0: