diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-28 23:39:39 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-28 23:39:39 +0000 |
commit | 52302d4dee589a5df43a464420c9fe68ba83937d (patch) | |
tree | 2393f61b9e8975134e3cdfa0352d4c51a3b2ac8d /BaseTools/Source/Python/AutoGen/UniClassObject.py | |
parent | fe35c036354c4b6bf18c4699a45156f3965fae2a (diff) | |
download | edk2-52302d4dee589a5df43a464420c9fe68ba83937d.tar.gz edk2-52302d4dee589a5df43a464420c9fe68ba83937d.tar.bz2 edk2-52302d4dee589a5df43a464420c9fe68ba83937d.zip |
Sync EDKII BaseTools to BaseTools project r1903.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10123 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/UniClassObject.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/UniClassObject.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py index dcfa264025..de2f93b8ea 100644 --- a/BaseTools/Source/Python/AutoGen/UniClassObject.py +++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py @@ -406,18 +406,10 @@ class UniFileClassObject(object): #
# Load multiple .uni files
#
- def LoadUniFiles(self, FileList = []):
+ def LoadUniFiles(self, FileList):
if len(FileList) > 0:
- if len(FileList) > 1:
- NewList = [];
- for File in FileList:
- NewList.append (File)
- NewList.sort()
- for File in NewList:
- self.LoadUniFile(File)
- else:
- for File in FileList:
- self.LoadUniFile(File)
+ for File in FileList:
+ self.LoadUniFile(File)
#
# Add a string to list
@@ -488,7 +480,6 @@ class UniFileClassObject(object): EdkLogger.debug(EdkLogger.DEBUG_5, Name)
Token = len(self.OrderedStringList[LangFind])
self.AddStringToList(Name, LangFind, Value, Token, Referenced, LangKey, Index)
-
#
# Retoken
#
@@ -497,7 +488,17 @@ class UniFileClassObject(object): ReferencedStringList = []
NotReferencedStringList = []
Token = 0
+
+ #
+ # Order UNI token by their String Name
+ #
+ StringNameList = []
for Item in self.OrderedStringList[LangName]:
+ StringNameList.append (Item.StringName)
+ StringNameList.sort()
+
+ for Name in StringNameList:
+ Item = self.FindStringValue (Name, LangName)
if Item.Referenced == True:
Item.Token = Token
ReferencedStringList.append(Item)
|