Kaynağa Gözat

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@linuxfoundation.org>
Richard Purdie 5 yıl önce
ebeveyn
işleme
2f0b6cea2b
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      lib/bb/fetch2/__init__.py

+ 1 - 1
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: