Commit 3b72a6f
authored
Fix: handle empty LOC_CHASSIS_TABLE (#190)
**- What I did**
We notice sometimes an error message. This PR will handle the case when the specific Redis table is not available/empty.
```
Jan 1 23:11:19.144294 vlab-01 ERR snmp#snmp-subagent [ax_interface] ERROR: MIBUpdater.start() caught an unexpected exception during update_data()
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/ax_interface/mib.py", line 37, in start
self.reinit_data()
File "/usr/local/lib/python3.7/dist-packages/sonic_ax_impl/mibs/ieee802_1ab.py", line 115, in reinit_data
self.loc_chassis_data['lldp_loc_sys_cap_supported'] = parse_sys_capability(self.loc_chassis_data['lldp_loc_sys_cap_supported'])
KeyError: 'lldp_loc_sys_cap_supported'
```
**- How I did it**
**- How to verify it**
Unit test1 parent 4aad821 commit 3b72a6f
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
0 commit comments