BaseTools: Refactor python raise statement
authorGary Lin <glin@suse.com>
Mon, 25 Jun 2018 10:31:32 +0000 (18:31 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 27 Jun 2018 08:33:24 +0000 (16:33 +0800)
Make "raise" to be compatible with python3.

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/gcc/mingw-gcc-build.py

index 20984d3..1cbf396 100755 (executable)
@@ -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) + \\r
+                'See output log at %s' % self.config.Relative(logFile))\r
         else:
             print('[done]')\r