mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
Handle problems accessing the ONIE eeprom more gracefully.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user