From df29fd130abcc3094b8c5d842e4bfadd91cbf0e8 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Mon, 25 Jun 2018 18:31:32 +0800 Subject: [PATCH] BaseTools: Refactor python raise statement Make "raise" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Reviewed-by: Yonghong Zhu --- BaseTools/gcc/mingw-gcc-build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/gcc/mingw-gcc-build.py b/BaseTools/gcc/mingw-gcc-build.py index 20984d3ec8..1cbf396b7b 100755 --- a/BaseTools/gcc/mingw-gcc-build.py +++ b/BaseTools/gcc/mingw-gcc-build.py @@ -507,8 +507,8 @@ class Builder: f = open(logFile, "w") f.write(output) f.close() - raise Exception, 'Failed to %s %s\n' % (stage, module) + \ - 'See output log at %s' % self.config.Relative(logFile) + raise Exception('Failed to %s %s\n' % (stage, module) + \ + 'See output log at %s' % self.config.Relative(logFile)) else: print('[done]') -- 2.39.2