FIX: Pylint reduce
[csit.git] / resources / libraries / python / VppApiCrc.py
index 94e2690..ca76397 100644 (file)
@@ -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
@@ -373,7 +373,8 @@ class VppApiCrcChecker:
         if not matching:
             self._reported[api_name] = crc
             self.log_and_raise(
-                f"No active collection contains API {api_name!r} with CRC {crc!r}"
+                f"No active collection contains API {api_name!r} with CRC "
+                f"{crc!r}"
             )
         options = self._options[api_name]
         options.pop(u"vat_help", None)