Skip to content

Commit

Permalink
Clean some unused variables, check for multiAsic before calling initi…
Browse files Browse the repository at this point in the history
…alizeGlobalConfig (sonic-net#130)

The check for multiAsic before calling initializeGlobalConfig was done in xcvrd earlier. 
Adding now to the other processes in sonic-platform-daemons as well.
  • Loading branch information
judyjoseph committed Dec 3, 2020
1 parent 12b3628 commit 5d74356
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions sonic-ledd/scripts/ledd
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ SELECT_TIMEOUT = 1000

LEDUTIL_LOAD_ERROR = 1

# The empty namespace refers to linux host namespace.
EMPTY_NAMESPACE = ''

class DaemonLedd(daemon_base.DaemonBase):

# Run daemon
Expand Down Expand Up @@ -70,8 +67,9 @@ class DaemonLedd(daemon_base.DaemonBase):
self.log_error("Failed to load ledutil: %s" % (str(e)), True)
sys.exit(LEDUTIL_LOAD_ERROR)

# Load the namespace details first from the database_global.json file.
swsscommon.SonicDBConfig.initializeGlobalConfig()
if multi_asic.is_multi_asic():
# Load the namespace details first from the database_global.json file.
swsscommon.SonicDBConfig.initializeGlobalConfig()

# Get the namespaces in the platform. For multi-asic devices we get the namespaces
# of front-end ascis which have front-panel interfaces.
Expand Down
3 changes: 0 additions & 3 deletions sonic-xcvrd/xcvrd/xcvrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@
# by DaemonXcvrd
helper_logger = logger.Logger(SYSLOG_IDENTIFIER)

# The empty namespace refers to linux host namespace.
EMPTY_NAMESPACE = ''

#
# Helper functions =============================================================
#
Expand Down
5 changes: 3 additions & 2 deletions sonic-xcvrd/xcvrd/xcvrd_utilities/y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,9 @@ class YCableTableUpdateTask(object):
def __init__(self):
self.task_thread = None

# Load the namespace details first from the database_global.json file.
swsscommon.SonicDBConfig.initializeGlobalConfig()
if multi_asic.is_multi_asic():
# Load the namespace details first from the database_global.json file.
swsscommon.SonicDBConfig.initializeGlobalConfig()

def task_worker(self):

Expand Down

0 comments on commit 5d74356

Please sign in to comment.