Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bugs #3

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sonic_platform_base/sonic_sfp/sfputilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from collections import OrderedDict
from natsort import natsorted
from sonic_daemon_base.daemon_base import DaemonBase

import sys
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))

Expand Down Expand Up @@ -383,7 +383,7 @@ def read_porttab_mappings(self, porttabfile):
parse_fmt_port_config_ini = (os.path.basename(porttabfile) == PORT_CONFIG_INI)
parse_fmt_platform_json = (os.path.basename(porttabfile) == PLATFORM_JSON)

(platform, hwsku) = DaemonBase.get_platform_and_hwsku()
(platform, hwsku) = DaemonBase().get_platform_and_hwsku()
if(parse_fmt_platform_json):
ports, _ = get_port_config(hwsku, platform)
if not ports:
Expand Down Expand Up @@ -423,7 +423,7 @@ def read_porttab_mappings(self, porttabfile):
print("logical to physical: {}".format(self.logical_to_physical))
print("physical to logical: {}".format( self.physical_to_logical))
"""
sys.exit(0)
return None


try:
Expand Down
6 changes: 3 additions & 3 deletions sonic_platform_base/sonic_sfp/sfputilhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from collections import OrderedDict
from natsort import natsorted
from sonic_daemon_base.daemon_base import DaemonBase

import sys
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))

Expand Down Expand Up @@ -55,7 +55,7 @@ def read_porttab_mappings(self, porttabfile):
parse_fmt_port_config_ini = (os.path.basename(porttabfile) == PORT_CONFIG_INI)
parse_fmt_platform_json = (os.path.basename(porttabfile) == PLATFORM_JSON)

(platform, hwsku) = DaemonBase.get_platform_and_hwsku()
(platform, hwsku) = DaemonBase().get_platform_and_hwsku()
if(parse_fmt_platform_json):
ports, _ = get_port_config(hwsku, platform)
if not ports:
Expand Down Expand Up @@ -92,7 +92,7 @@ def read_porttab_mappings(self, porttabfile):
print("logical to physical: {}".format(self.logical_to_physical))
print("physical to logical: {}".format( self.physical_to_logical))
"""
sys.exit(0)
return None


try:
Expand Down