Resolve deprecation warning from pecan

Resolve the following warning raised from pecan.

```
DeprecationWarning: The function signature for
watcher.api.controllers.root.RootController._route is changing in
the next version of pecan.
Please update to: `def _route(self, args, request)`.
```

Change-Id: I7081cf956a8baa05cd70ced0496ca8192fff979e
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-08-18 20:33:50 +09:00
parent 8309d9848a
commit 7b5243fa8d

View File

@@ -109,7 +109,7 @@ class RootController(rest.RestController):
return Root.convert()
@pecan.expose()
def _route(self, args):
def _route(self, args, request=None):
"""Overrides the default routing behavior.
It redirects the request to the default version of the watcher API
@@ -118,4 +118,4 @@ class RootController(rest.RestController):
if args[0] and args[0] not in self._versions:
args = [self._default_version] + args
return super(RootController, self)._route(args)
return super(RootController, self)._route(args, request)