]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/UniClassObject.py
BaseTools: remove redundant check
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / UniClassObject.py
index 8b0c563a8c8880a1b8e1905d43b5606888ee0a8f..5b879d784d9c29b0ee9920ec7d11d643d8dd366f 100644 (file)
@@ -352,7 +352,7 @@ class UniFileClassObject(object):
         # Check the string name\r
         if Name != '':\r
             MatchString = gIdentifierPattern.match(Name)\r
-            if MatchString is None or MatchString.end(0) != len(Name):\r
+            if MatchString is None:\r
                 EdkLogger.error('Unicode File Parser', FORMAT_INVALID, 'The string token name %s defined in UNI file %s contains the invalid character.' % (Name, self.File))\r
         LanguageList = Item.split(u'#language ')\r
         for IndexI in range(len(LanguageList)):\r
@@ -522,7 +522,7 @@ class UniFileClassObject(object):
                 # Check the string name\r
                 if not self.IsCompatibleMode and Name != '':\r
                     MatchString = gIdentifierPattern.match(Name)\r
-                    if MatchString is None or MatchString.end(0) != len(Name):\r
+                    if MatchString is None:\r
                         EdkLogger.error('Unicode File Parser', FORMAT_INVALID, 'The string token name %s defined in UNI file %s contains the invalid character.' % (Name, self.File))\r
                 self.AddStringToList(Name, Language, Value)\r
                 continue\r