We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 159a56a commit 6738bcdCopy full SHA for 6738bcd
sonic_platform_base/sonic_xcvr/api/public/cmis.py
@@ -1064,7 +1064,11 @@ def get_host_lane_assignment_option(self, appl=1):
1064
return 0
1065
1066
appl_advt = self.get_application_advertisement()
1067
- return appl_advt[appl]['host_lane_assignment_options'] if len(appl_advt) >= appl else 0
+ if appl not in appl_advt:
1068
+ logger.error('Application {} not found in application advertisement'.format(appl))
1069
+ return 0
1070
+
1071
+ return appl_advt[appl].get('host_lane_assignment_options', 0)
1072
1073
def get_media_lane_assignment_option(self, appl=1):
1074
'''
0 commit comments