]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix python3.8 SyntaxWarning
authorCole Robinson <crobinso@redhat.com>
Fri, 12 Jul 2019 17:29:28 +0000 (01:29 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Mon, 15 Jul 2019 01:09:25 +0000 (09:09 +0800)
Building with python3.8 shows a warning like:

SyntaxWarning: invalid escape sequence \(
  GuidName = re.compile("\(GUID=[-a-fA-F0-9]+")

It seems harmless, but it's easy enough to fix: mark the string as
raw with the 'r' prefix like is used elsewhere in the file

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/build/build.py

index 8c3315619afa55cb61c43e4dcccd1b9b4f5500ca..d6006b651f77a3e9b5a0feebd516ed4586664338 100644 (file)
@@ -1499,7 +1499,7 @@ class Build():
         if self.Fdf:\r
             # First get the XIP base address for FV map file.\r
             GuidPattern = re.compile("[-a-fA-F0-9]+")\r
-            GuidName = re.compile("\(GUID=[-a-fA-F0-9]+")\r
+            GuidName = re.compile(r"\(GUID=[-a-fA-F0-9]+")\r
             for FvName in Wa.FdfProfile.FvDict:\r
                 FvMapBuffer = os.path.join(Wa.FvDir, FvName + '.Fv.map')\r
                 if not os.path.exists(FvMapBuffer):\r