BaseTools: Refactor python except statements
Convert "except ... ," to "except ... as" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_except" 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>
This commit is contained in:
@ -335,10 +335,10 @@ def main():
|
||||
"""Display FV space info."""
|
||||
GenFds.DisplayFvSpaceInfo(FdfParserObj)
|
||||
|
||||
except FdfParser.Warning, X:
|
||||
except FdfParser.Warning as X:
|
||||
EdkLogger.error(X.ToolName, FORMAT_INVALID, File=X.FileName, Line=X.LineNumber, ExtraData=X.Message, RaiseError=False)
|
||||
ReturnCode = FORMAT_INVALID
|
||||
except FatalError, X:
|
||||
except FatalError as X:
|
||||
if Options.debug is not None:
|
||||
import traceback
|
||||
EdkLogger.quiet(traceback.format_exc())
|
||||
|
Reference in New Issue
Block a user