[oe-commits] [bitbake] 03/03: fetch2: Avoid warning about incorrect character escaping in regex

git at git.openembedded.org git at git.openembedded.org
Tue Nov 27 22:17:10 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository bitbake.

commit 2f0b6cea2be7e89ef01181b10899b3e7f11e8f20
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Nov 27 11:33:22 2018 +0000

    fetch2: Avoid warning about incorrect character escaping in regex
    
    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 8d05f0c..709372e 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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list