From e9d7edcc257bec211d9c8bf682fec0422d2e3d04 Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Wed, 19 Aug 2020 14:07:21 -0700 Subject: [PATCH] Rebasing again and taking only the changes in file daemon_base.py --- src/sonic-py-common/sonic_py_common/daemon_base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sonic-py-common/sonic_py_common/daemon_base.py b/src/sonic-py-common/sonic_py_common/daemon_base.py index 6a2c6a22d2aa..97bf3011b6e4 100644 --- a/src/sonic-py-common/sonic_py_common/daemon_base.py +++ b/src/sonic-py-common/sonic_py_common/daemon_base.py @@ -13,13 +13,16 @@ EEPROM_MODULE_NAME = 'eeprom' EEPROM_CLASS_NAME = 'board' +# The empty namespace refers to linux host namespace. +EMPTY_NAMESPACE = '' + # # Helper functions ============================================================= # -def db_connect(db_name): +def db_connect(db_name, namespace=EMPTY_NAMESPACE): from swsscommon import swsscommon - return swsscommon.DBConnector(db_name, REDIS_TIMEOUT_MSECS, True) + return swsscommon.DBConnector(db_name, REDIS_TIMEOUT_MSECS, True, namespace) # # DaemonBase ===================================================================