Commit 5cff775
authored
[show] Fix int status when portchannel is in the system (sonic-net#1376)
* Fixed int stat with portchannel
* Replace N/A with None
Fixed crash of "show int status" command when there are portchannels in system.
Traceback (most recent call last):
File "/usr/local/bin/intfutil", line 521, in <module>
main()
File "/usr/local/bin/intfutil", line 513, in main
interface_stat.display_intf_status()
File "/usr/local/bin/intfutil", line 354, in display_intf_status
self.get_intf_status()
File "/usr/local/lib/python3.7/dist-packages/utilities_common/multi_asic.py", line 137, in wrapped_run_on_all_asics
func(self, *args, **kwargs)
File "/usr/local/bin/intfutil", line 435, in get_intf_status
self.portchannel_speed_dict = po_speed_dict(self.po_int_dict, self.db)
File "/usr/local/bin/intfutil", line 249, in po_speed_dict
interface_speed = '{}G'.format(interface_speed[:-3])
TypeError: 'NoneType' object is not subscriptable
Signed-off-by: d-dashkov <Dmytro_Dashkov@Jabil.com>1 parent 9e0a4fa commit 5cff775
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| |||
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
| 279 | + | |
| 280 | + | |
275 | 281 | | |
276 | 282 | | |
277 | 283 | | |
| |||
0 commit comments