diff options
author | Vratko Polak <vrpolak@cisco.com> | 2024-01-22 14:56:02 +0100 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2024-01-23 16:34:14 +0000 |
commit | 1effb29aa2c3e9179192dd3919c8d849fcb08dae (patch) | |
tree | 63edd4dcb52c23ebd63bd4d4656dcea11919d073 /src/vpp-api/python | |
parent | e6d05dc1b6420f6de2703b2b14a4845ea7436a39 (diff) |
papi: support old style of providing apidir
77caeb1b193404e76beb27a1aa81321e8eb1cf1f has changed the behavior
in an incompatible way, breaking users (including CSIT).
The new behavior is more pythonic,
but the old behavior has to be supported
at least one release after publicly deprecating it.
Type: fix
Change-Id: I9dfdd2229065010216e49db80b14b856c545965c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'src/vpp-api/python')
-rw-r--r-- | src/vpp-api/python/vpp_papi/vpp_papi.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py index 5c089647e59..5a9e0a70c64 100644 --- a/src/vpp-api/python/vpp_papi/vpp_papi.py +++ b/src/vpp-api/python/vpp_papi/vpp_papi.py @@ -473,9 +473,12 @@ class VPPApiClient: self._apifiles = apifiles self.stats = {} + if self.apidir is None and hasattr(self.__class__, "apidir"): + # Keep supporting the old style of providing apidir. + self.apidir = self.__class__.apidir try: self.apifiles, self.messages, self.services = VPPApiJSONFiles.load_api( - apifiles, apidir + apifiles, self.apidir ) except VPPRuntimeError as e: if testmode: |