summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r--BaseTools/Source/Python/Common/RangeExpression.py3
-rw-r--r--BaseTools/Source/Python/Common/ToolDefClassObject.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/Source/Python/Common/RangeExpression.py
index 407dc06ccf..40958451d2 100644
--- a/BaseTools/Source/Python/Common/RangeExpression.py
+++ b/BaseTools/Source/Python/Common/RangeExpression.py
@@ -19,6 +19,7 @@ from CommonDataClass.Exceptions import WrnExpression
import uuid
from Common.Expression import PcdPattern, BaseExpression
from Common.DataType import *
+from re import compile
ERR_STRING_EXPR = 'This operator cannot be used in string expression: [%s].'
ERR_SNYTAX = 'Syntax error, the rest of expression cannot be evaluated: [%s].'
@@ -202,7 +203,7 @@ class RangeExpression(BaseExpression):
NonLetterOpLst = ['+', '-', '&', '|', '^', '!', '=', '>', '<']
- RangePattern = re.compile(r'[0-9]+ - [0-9]+')
+ RangePattern = compile(r'[0-9]+ - [0-9]+')
def preProcessRangeExpr(self, expr):
# convert hex to int
diff --git a/BaseTools/Source/Python/Common/ToolDefClassObject.py b/BaseTools/Source/Python/Common/ToolDefClassObject.py
index 186d279840..0a78123e2c 100644
--- a/BaseTools/Source/Python/Common/ToolDefClassObject.py
+++ b/BaseTools/Source/Python/Common/ToolDefClassObject.py
@@ -1,7 +1,7 @@
## @file
# This file is used to define each component of tools_def.txt file
#
-# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -20,7 +20,7 @@ import re
from . import EdkLogger
from .BuildToolError import *
-from .TargetTxtClassObject import *
+from Common.TargetTxtClassObject import TargetTxtDict
from Common.LongFilePathSupport import OpenLongFilePath as open
from Common.Misc import PathClass
from Common.StringUtils import NormPath