Skip to content

Commit

Permalink
fix bugs (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Sangita Maity <[email protected]>
  • Loading branch information
samaity authored Mar 3, 2020
1 parent ed88e95 commit 26bc0b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 26bc0b8

Please sign in to comment.