Skip to content

Commit

Permalink
[Mellanox] Fix issue: need import initialize_sdk_handle in get_sdk_ha…
Browse files Browse the repository at this point in the history
…ndle (#6435)

Found test_sfp.py failed due to use a method without importing it.
  • Loading branch information
Junchao-Mellanox authored Jan 13, 2021
1 parent 68e9b83 commit 0a49edb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def initialize_fan(self):

def initialize_sfp(self):
from sonic_platform.sfp import SFP
from sonic_platform.sfp import initialize_sdk_handle

self.sfp_module = SFP

Expand All @@ -137,6 +136,7 @@ def initialize_sfp(self):

def get_sdk_handle(self):
if not self.sdk_handle:
from sonic_platform.sfp import initialize_sdk_handle
self.sdk_handle = initialize_sdk_handle()
if self.sdk_handle is None:
logger.log_error('Failed to open SDK handle')
Expand Down

0 comments on commit 0a49edb

Please sign in to comment.