Skip to content

Commit e7f54ea

Browse files
deepak-singhal0408nmoray
authored andcommitted
T2-VOQ-VS: Modified exception handling due to new sonic_platform package support for VS (sonic-net#3250)
### What I did For T2-Chassis VS support, we are adding new sonic_platform package for vs platforms. Please refer sonic-net/sonic-buildimage#18512 for more details. Due to this new platform package, need to modify excpetion handling as now the Module would be found, but the metadata file will not be found for pizzabox vs platforms. #### How I did it Modified the exception handling logic. MSFT ADO: 27414904 #### How to verify it Bring up vms-kvm-t0 topology. ran show interface status. The output is proper. PS: the Main PR(sonic-net/sonic-buildimage#18512) is dependent on this PR to be merged in first.
1 parent d8afddc commit e7f54ea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

utilities_common/platform_sfputil_helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ def is_rj45_port(port_name):
121121
if not platform_sfp_base:
122122
import sonic_platform_base
123123
platform_sfp_base = sonic_platform_base.sfp_base.SfpBase
124-
except ModuleNotFoundError as e:
124+
except (ModuleNotFoundError, FileNotFoundError) as e:
125125
# This method is referenced by intfutil which is called on vs image
126-
# However, there is no platform API supported on vs image
127-
# So False is returned in such case
126+
# sonic_platform API support is added for vs image(required for chassis), it expects a metadata file, which
127+
# wont be available on vs pizzabox duts, So False is returned(if either ModuleNotFound or FileNotFound)
128128
return False
129129

130130
if platform_chassis and platform_sfp_base:

0 commit comments

Comments
 (0)