[bitbake-devel] [PATCH 3/3] fetch2: Avoid warning about incorrect character escaping in regex

Richard Purdie richard.purdie at linuxfoundation.org
Tue Nov 27 22:14:46 UTC 2018


Fixes:

lib/bb/fetch2/__init__.py:259: DeprecationWarning: invalid escape sequence \w
  re.compile("^\w+:(?!//)").match(uri):

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 8d05f0c3d8..709372e16f 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -256,7 +256,7 @@ class URI(object):
 
         # Identify if the URI is relative or not
         if urlp.scheme in self._relative_schemes and \
-           re.compile("^\w+:(?!//)").match(uri):
+           re.compile(r"^\w+:(?!//)").match(uri):
             self.relative = True
 
         if not self.relative:
-- 
2.17.1



More information about the bitbake-devel mailing list