提交 662da385 编写于 作者: S Stefan Hajnoczi

tracetool: use Python 2.4-compatible exception handling syntax

The newer "except <exception-type> as <exception>:" syntax is not
supported by Python 2.4, we need to use "except <exception-type>,
<exception>:".

Tested all trace backends with Python 2.4.
Reported-by: NAndreas Färber <afaerber@suse.de>
Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
上级 b754e4fc
......@@ -70,7 +70,7 @@ def main(args):
try:
opts, args = getopt.getopt(args[1:], "", long_opts)
except getopt.GetoptError as err:
except getopt.GetoptError, err:
error_opt(str(err))
check_backend = False
......@@ -131,7 +131,7 @@ def main(args):
try:
tracetool.generate(sys.stdin, arg_format, arg_backend,
binary = binary, probe_prefix = probe_prefix)
except tracetool.TracetoolError as e:
except tracetool.TracetoolError, e:
error_opt(str(e))
if __name__ == "__main__":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册