summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2019-01-11 02:39:47 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-01-21 18:03:32 +0800
commit2b95556c06c445f7cbc02a9c92ce5481d760bddb (patch)
treea6c6653d215cfd78396ee94d1b1bc4f71bd01616 /BaseTools/Source/Python/Common
parent12ba816e61a8dc400b10433a6548e52d62e2cba8 (diff)
downloadedk2-2b95556c06c445f7cbc02a9c92ce5481d760bddb.tar.gz
edk2-2b95556c06c445f7cbc02a9c92ce5481d760bddb.tar.bz2
edk2-2b95556c06c445f7cbc02a9c92ce5481d760bddb.zip
BaseTools/DscBuildData: move function
Move IsFieldValuieAnArray from Common.Misc to this file. There were no other consumers of the function. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r--BaseTools/Source/Python/Common/Misc.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index ae66afd26f..4c6660b844 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -1,7 +1,7 @@
## @file
# Common routines used by all tools
#
-# 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
@@ -1149,22 +1149,6 @@ class tdict:
keys |= self.data[Key].GetKeys(KeyIndex - 1)
return keys
-def IsFieldValueAnArray (Value):
- Value = Value.strip()
- if Value.startswith(TAB_GUID) and Value.endswith(')'):
- return True
- if Value.startswith('L"') and Value.endswith('"') and len(list(Value[2:-1])) > 1:
- return True
- if Value[0] == '"' and Value[-1] == '"' and len(list(Value[1:-1])) > 1:
- return True
- if Value[0] == '{' and Value[-1] == '}':
- return True
- if Value.startswith("L'") and Value.endswith("'") and len(list(Value[2:-1])) > 1:
- return True
- if Value[0] == "'" and Value[-1] == "'" and len(list(Value[1:-1])) > 1:
- return True
- return False
-
def AnalyzePcdExpression(Setting):
RanStr = ''.join(sample(string.ascii_letters + string.digits, 8))
Setting = Setting.replace('\\\\', RanStr).strip()