commit | b8fd6d3813baa5a9fc0327750f8dfeec773ba612 | [log] [tgz] |
---|---|---|
author | Willy Tu <wltu@google.com> | Thu Nov 04 20:40:07 2021 -0700 |
committer | Willy Tu <wltu@google.com> | Tue Nov 09 23:06:20 2021 +0000 |
tree | 2070432439099a5f0c79411de304874f0b775366 | |
parent | 2862421c8b0b1298e262b8f6ac8c05f16497f20a [diff] |
bmc: version: Skip version if it does not exist in the config Change-Id: I1ea876183ff12dab8fc479c45f7b3a9eba50b56f Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/bmc/version-handler/version_handlers_builder.cpp b/bmc/version-handler/version_handlers_builder.cpp index f27fa54..044f4e3 100644 --- a/bmc/version-handler/version_handlers_builder.cpp +++ b/bmc/version-handler/version_handlers_builder.cpp
@@ -58,6 +58,11 @@ } output.blobId = "/version/" + matches[1].str(); /* version is required. */ + if (!item.contains("version")) + { + continue; + } + const auto& v = item.at("version"); /* version must have handler */ const auto& h = v.at("handler");