aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VppApiCrc.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2021-03-15 10:02:45 +0100
committerDave Wallace <dwallacelf@gmail.com>2021-03-16 00:46:49 +0000
commit1d84dc8e8f916bb0854e80e60bad1006d8d7be25 (patch)
tree2ec9301bc7560d0b66a04631043fc3e970eef48f /resources/libraries/python/VppApiCrc.py
parenteb19fb2a7ce7c3a40e3a1a3042a15b0d728e4784 (diff)
API options: Fix case when no options are present
In that case we want to pass by returning an empty dict, as docstring already describes. Before this, the code failed when checking for included version. Change-Id: Ia0d6b81a64ad0e7027ac7daf15c72ace1f6982ce Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/VppApiCrc.py')
-rw-r--r--resources/libraries/python/VppApiCrc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/libraries/python/VppApiCrc.py b/resources/libraries/python/VppApiCrc.py
index 94e2690d8b..1fcb91d4b9 100644
--- a/resources/libraries/python/VppApiCrc.py
+++ b/resources/libraries/python/VppApiCrc.py
@@ -197,8 +197,8 @@ class VppApiCrcChecker:
for item in reversed(msg_obj):
if not isinstance(item, dict):
continue
- options = item.get(u"options", None)
- if options is not None:
+ options = item.get(u"options", dict())
+ if not options:
break
if version is None or version.startswith(u"0."):
options[u"version"] = version