Handle problems accessing the ONIE eeprom more gracefully.

This commit is contained in:
Jeffrey Townsend
2017-10-15 20:28:49 +00:00
parent 158b80d6ba
commit c04a9a2604
2 changed files with 3 additions and 1 deletions

View File

@@ -164,6 +164,7 @@ class OnlPlatformBase(object):
except ValueError, e:
if required:
raise e
self.add_info_dict(name, {}, klass)
elif required:
raise RuntimeError("A required system file (%s) is missing." % f)

View File

@@ -143,7 +143,8 @@ onlp_sys_info_get_locked__(onlp_sys_info_t* rv)
}
else {
if(onlp_sysi_onie_info_get(&rv->onie_info) != 0) {
return ONLP_STATUS_E_INTERNAL;
memset(&rv->onie_info, 0, sizeof(rv->onie_info));
list_init(&rv->onie_info.vx_list);
}
}