summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2019-07-21 06:31:11 +0300
committerFeng, Bob C <bob.c.feng@intel.com>2019-07-22 07:06:03 +0300
commitbb824f685d760f560bb3c3fb14af394ab3b3544f (patch)
tree01a4a2697e3b44693c0934562055893c2d7c8ef5 /BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
parent5f89bcc4604ea9e439039d873e34a8c06b47c707 (diff)
downloadedk2-bb824f685d760f560bb3c3fb14af394ab3b3544f.tar.xz
BaseTools: Fixed the mis-using strip() function issue.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2003 lstrip(parameter) do the match based on the char in parameter but not only the whole parameter string. In GenMake line 1082, CmdSign.lstrip('/Fo') will strip the '/' or 'F' or 'o' on the left of CmdSign. This is not expected. This patch is going to fix such issue. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py')
-rw-r--r--BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index c9c476cf61..f43743dff4 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -793,7 +793,10 @@ class GenFdsGlobalVariable:
def GetPcdValue (PcdPattern):
if PcdPattern is None:
return None
- PcdPair = PcdPattern.lstrip('PCD(').rstrip(')').strip().split('.')
+ if PcdPattern.startswith('PCD('):
+ PcdPair = PcdPattern[4:].rstrip(')').strip().split('.')
+ else:
+ PcdPair = PcdPattern.strip().split('.')
TokenSpace = PcdPair[0]
TokenCName = PcdPair[1]