From: Gary Lin Date: Mon, 25 Jun 2018 10:31:32 +0000 (+0800) Subject: BaseTools: Refactor python raise statement X-Git-Tag: edk2-stable201903~1518 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=df29fd130abcc3094b8c5d842e4bfadd91cbf0e8 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 --- 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]')