@@ -120,7 +120,7 @@ class MlnxSfpd:
120
120
raise RuntimeError ("sx_api_host_ifc_open exited with error, rc {}" .format (rc ))
121
121
122
122
self .user_channel_p .type = SX_USER_CHANNEL_TYPE_FD
123
- self .user_channel_p .fd = self .rx_fd_p
123
+ self .user_channel_p .channel . fd = self .rx_fd_p
124
124
125
125
rc = sx_api_host_ifc_trap_id_register_set (self .handle ,
126
126
SX_ACCESS_CMD_REGISTER ,
@@ -170,8 +170,8 @@ class MlnxSfpd:
170
170
171
171
for fd in read :
172
172
if fd == self .rx_fd_p .fd :
173
- rc , port_list , module_state = self .on_pmpe (self .rx_fd_p )
174
- if rc != SX_STATUS_SUCCESS :
173
+ success , port_list , module_state = self .on_pmpe (self .rx_fd_p )
174
+ if not success :
175
175
raise RuntimeError ("failed to read from {}" .format (fd ))
176
176
177
177
sfp_state = sfp_value_status_dict .get (module_state , STATUS_UNKNOWN )
@@ -187,7 +187,7 @@ class MlnxSfpd:
187
187
188
188
def send_sfp_notification (self , port , state ):
189
189
sfp_notify = [port , state ]
190
- msg = json .dumps (sfp_notify , seperators = (',' , ':' ))
190
+ msg = json .dumps (sfp_notify , separators = (',' , ':' ))
191
191
self .state_db .publish ('STATE_DB' , 'TRANSCEIVER_NOTIFY' , msg )
192
192
193
193
def update_sfpd_liveness_key (self , timeout_secs ):
0 commit comments