X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FCommon%2FFdfParserLite.py;h=df287414db6f6c847669001ff47eae27a79218d6;hp=7d129bfcab5909d77e4bd81918e5beea89580f62;hb=2eb370ffdb179a865a65a3bca40d284958e42424;hpb=4d83616f9d7731934e7f91058efb165a2bc5b9d7 diff --git a/BaseTools/Source/Python/Common/FdfParserLite.py b/BaseTools/Source/Python/Common/FdfParserLite.py index 7d129bfcab..df287414db 100644 --- a/BaseTools/Source/Python/Common/FdfParserLite.py +++ b/BaseTools/Source/Python/Common/FdfParserLite.py @@ -1,7 +1,7 @@ ## @file # parse FDF file # -# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -21,6 +21,7 @@ import Common.LongFilePathOs as os import CommonDataClass.FdfClass from Common.LongFilePathSupport import OpenLongFilePath as open from Common.MultipleWorkspace import MultipleWorkspace as mws +from Common.RangeExpression import RangeExpression ##define T_CHAR_SPACE ' ' ##define T_CHAR_NULL '\0' @@ -931,8 +932,7 @@ class FdfParser(object): if not self.__GetNextToken(): return False - p = re.compile('[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}') - if p.match(self.__Token) != None: + if RangeExpression.RegGuidPattern.match(self.__Token) != None: return True else: self.__UndoToken()