public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Cole Robinson <crobinso@redhat.com>
To: devel@edk2.groups.io
Cc: Laszlo Ersek <lersek@redhat.com>, Cole Robinson <crobinso@redhat.com>
Subject: [PATCH] BaseTools: Fix python3.8 SyntaxWarning
Date: Fri, 12 Jul 2019 13:29:28 -0400	[thread overview]
Message-ID: <6692fad1d6b57307a5da195986ed23074021fc88.1562952568.git.crobinso@redhat.com> (raw)

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>
---
 BaseTools/Source/Python/build/build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


             reply	other threads:[~2019-07-12 17:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 17:29 Cole Robinson [this message]
2019-07-12 21:03 ` [PATCH] BaseTools: Fix python3.8 SyntaxWarning Laszlo Ersek
2019-07-13  2:54   ` Bob Feng
2019-07-15 14:46     ` [edk2-devel] " Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6692fad1d6b57307a5da195986ed23074021fc88.1562952568.git.crobinso@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox