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:
@ -1121,7 +1121,7 @@ class InfBuildData(ModuleBuildClassObject):
|
||||
else:
|
||||
try:
|
||||
Pcd.DefaultValue = ValueExpressionEx(Pcd.DefaultValue, Pcd.DatumType, _GuidDict)(True)
|
||||
except BadExpression, Value:
|
||||
except BadExpression as Value:
|
||||
EdkLogger.error('Parser', FORMAT_INVALID, 'PCD [%s.%s] Value "%s", %s' %(TokenSpaceGuid, PcdRealName, Pcd.DefaultValue, Value),
|
||||
File=self.MetaFile, Line=LineNo)
|
||||
break
|
||||
|
Reference in New Issue
Block a user