\r
try:\r
Processer[self._ItemType]()\r
- except EvaluationException, Excpt:\r
+ except EvaluationException as Excpt:\r
# \r
# Only catch expression evaluation error here. We need to report\r
# the precise number of line on which the error occurred\r
# EdkLogger.error('Parser', FORMAT_INVALID, "Invalid expression: %s" % str(Excpt),\r
# File=self._FileWithError, ExtraData=' '.join(self._ValueList),\r
# Line=self._LineIndex+1)\r
- except MacroException, Excpt:\r
+ except MacroException as Excpt:\r
EdkLogger.error('Parser', FORMAT_INVALID, str(Excpt),\r
File=self._FileWithError, ExtraData=' '.join(self._ValueList), \r
Line=self._LineIndex+1)\r
Macros.update(GlobalData.gGlobalDefines)\r
try:\r
Result = ValueExpression(self._ValueList[1], Macros)()\r
- except SymbolNotFound, Exc:\r
+ except SymbolNotFound as Exc:\r
EdkLogger.debug(EdkLogger.DEBUG_5, str(Exc), self._ValueList[1])\r
Result = False\r
- except WrnExpression, Excpt:\r
+ except WrnExpression as Excpt:\r
# \r
# Catch expression evaluation warning here. We need to report\r
# the precise number of line and return the evaluation result\r
File=self._FileWithError, ExtraData=' '.join(self._ValueList), \r
Line=self._LineIndex+1)\r
Result = Excpt.result\r
- except BadExpression, Exc:\r
+ except BadExpression as Exc:\r
EdkLogger.debug(EdkLogger.DEBUG_5, str(Exc), self._ValueList[1])\r
Result = False\r
\r
PcdValue = ValueList[0] \r
try:\r
ValueList[0] = ValueExpression(PcdValue, self._Macros)(True)\r
- except WrnExpression, Value:\r
+ except WrnExpression as Value:\r
ValueList[0] = Value.result \r
else:\r
PcdValue = ValueList[-1]\r
try:\r
ValueList[-1] = ValueExpression(PcdValue, self._Macros)(True)\r
- except WrnExpression, Value:\r
+ except WrnExpression as Value:\r
ValueList[-1] = Value.result\r
\r
if ValueList[-1] == 'True':\r