mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
BaseTools/Scripts/BinToPcd.py: Update regex strings to use raw strings.
With Python 3.12 invalid escape sequences now generate warning messages. This change fixes the problem exposed by the warning message. ``` BaseTools/Scripts\BinToPcd.py:40: SyntaxWarning: invalid escape sequence BaseTools\Scripts\BinToPcd.py:46: SyntaxWarning: invalid escape sequence ``` Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
This commit is contained in:
parent
85fad9912c
commit
71b9bda1ac
@ -37,13 +37,13 @@ if __name__ == '__main__':
|
||||
return Value
|
||||
|
||||
def ValidatePcdName (Argument):
|
||||
if re.split ('[a-zA-Z\_][a-zA-Z0-9\_]*\.[a-zA-Z\_][a-zA-Z0-9\_]*', Argument) != ['', '']:
|
||||
if re.split (r'[a-zA-Z\_][a-zA-Z0-9\_]*\.[a-zA-Z\_][a-zA-Z0-9\_]*', Argument) != ['', '']:
|
||||
Message = '{Argument} is not in the form <PcdTokenSpaceGuidCName>.<PcdCName>'.format (Argument = Argument)
|
||||
raise argparse.ArgumentTypeError (Message)
|
||||
return Argument
|
||||
|
||||
def ValidateGuidName (Argument):
|
||||
if re.split ('[a-zA-Z\_][a-zA-Z0-9\_]*', Argument) != ['', '']:
|
||||
if re.split (r'[a-zA-Z\_][a-zA-Z0-9\_]*', Argument) != ['', '']:
|
||||
Message = '{Argument} is not a valid GUID C name'.format (Argument = Argument)
|
||||
raise argparse.ArgumentTypeError (Message)
|
||||
return Argument
|
||||
|
Loading…
x
Reference in New Issue
Block a user