diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-06 14:48:26 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-06 22:27:21 +0000 |
commit | 57c738a9118a7a900fc7353d88a385d52c8be6f5 (patch) | |
tree | d3b1218a2e2240c911a9b4061ee2e0aaa2244f96 | |
parent | e8574ee78eea23cc35900610bb15e47e40ef5ee1 (diff) | |
download | bitbake-57c738a9118a7a900fc7353d88a385d52c8be6f5.tar.gz |
toastergui: Fix regex markup issues
lib/toaster/toastergui/templatetags/projecttags.py:170: DeprecationWarning: invalid escape sequence '\$'
value=re.sub('_\$.*', '', value)
tests/views/test_views.py::ViewTests::test_custom_incomplete_params
lib/toaster/toastergui/urls.py:211: DeprecationWarning: invalid escape sequence '\d'
'/packages/(?P<package_id>\d+|)$',
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/toaster/toastergui/templatetags/projecttags.py | 4 | ||||
-rw-r--r-- | lib/toaster/toastergui/urls.py | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/toaster/toastergui/templatetags/projecttags.py b/lib/toaster/toastergui/templatetags/projecttags.py index c432f59a7..bd398f001 100644 --- a/lib/toaster/toastergui/templatetags/projecttags.py +++ b/lib/toaster/toastergui/templatetags/projecttags.py @@ -167,8 +167,8 @@ def check_filter_status(options, filter): def variable_parent_name(value): """ filter extended variable names to the parent name """ - value=re.sub('_\$.*', '', value) - return re.sub('_[a-z].*', '', value) + value = re.sub(r'_\$.*', '', value) + return re.sub(r'_[a-z].*', '', value) @register.filter def filter_setin_files(file_list, matchstr): diff --git a/lib/toaster/toastergui/urls.py b/lib/toaster/toastergui/urls.py index bc3b0c79d..2c138d3d7 100644 --- a/lib/toaster/toastergui/urls.py +++ b/lib/toaster/toastergui/urls.py @@ -206,8 +206,7 @@ urlpatterns = [ url(r'^js-unit-tests/$', views.jsunittests, name='js-unit-tests'), # image customisation functionality - url(r'^xhr_customrecipe/(?P<recipe_id>\d+)' - '/packages/(?P<package_id>\d+|)$', + url(r'^xhr_customrecipe/(?P<recipe_id>\d+)/packages/(?P<package_id>\d+|)$', api.XhrCustomRecipePackages.as_view(), name='xhr_customrecipe_packages'), |