summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorAntaeus Kleinert-Strand <59579659+antklein@users.noreply.github.com>2023-10-26 15:03:19 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-01 11:04:09 +0000
commit71b9bda1ace32a479d471f26b0e516d0618053bc (patch)
tree5a44405e07c04ead5a41258a31b82f9c206d8ec8 /BaseTools
parent85fad9912c860927aec3953e213662ea1f397c23 (diff)
downloadedk2-71b9bda1ace32a479d471f26b0e516d0618053bc.tar.gz
edk2-71b9bda1ace32a479d471f26b0e516d0618053bc.tar.bz2
edk2-71b9bda1ace32a479d471f26b0e516d0618053bc.zip
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>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Scripts/BinToPcd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Scripts/BinToPcd.py b/BaseTools/Scripts/BinToPcd.py
index be726cc6d8..43fc458b04 100644
--- a/BaseTools/Scripts/BinToPcd.py
+++ b/BaseTools/Scripts/BinToPcd.py
@@ -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