summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-05-23 19:01:29 +0200
committerVratko Polak <vrpolak@cisco.com>2019-05-23 19:01:46 +0200
commitcbf1fd240318bf428f016c651be35f92e0bc13ca (patch)
tree4875d78cbf9a2a40004d2251ba4d1b3738f1a58c
parentf0917bd5a7483aad270c4c17f097f84617aa20f3 (diff)
vpp_papi: Do not raise before find_api_dir()
The change https://gerrit.fd.io/r/18352 has introduced a check which raises when neither apifiles nor apidir are set. This change removes that check, as it broke CSIT. If such a check is intended, find_api_dir() should be removed. Also, make sure you do not break CSIT next time. Change-Id: I0faab7c41d199e3aa5d5bc6aab0defd1ab9e10da Signed-off-by: Vratko Polak <vrpolak@cisco.com>
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_papi.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py
index 8dcd63a0c55..f29c250744d 100644
--- a/src/vpp-api/python/vpp_papi/vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi/vpp_papi.py
@@ -212,9 +212,6 @@ class VPPApiClient(object):
loglevel, if supplied, is the log level this logger is set
to report at (from the loglevels in the logging module).
"""
- if apifiles is None and self.__class__.apidir is None:
- raise ValueError("Either apifiles or apidir must be specified.")
-
if logger is None:
logger = logging.getLogger(__name__)
if loglevel is not None:
@@ -292,7 +289,7 @@ class VPPApiClient(object):
:returns: A single directory name, or None if no such directory
could be found.
"""
- dirs = [cls.apidir]
+ dirs = [cls.apidir] if cls.apidir else []
# perhaps we're in the 'src/scripts' or 'src/vpp-api/python' dir;
# in which case, plot a course to likely places in the src tree