From 7d8597933f292e7220dbf01cb5f5af50ed18afa2 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Wed, 27 Apr 2022 09:36:36 +0800 Subject: [PATCH] test: add client config for test cases --- tests/pytest/util/dnodes.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index a60873c8ef..7e4e226e8a 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -114,11 +114,14 @@ class TDSimClient: for key, value in self.cfgDict.items(): self.cfg(key, value) - if bool(updatecfgDict) and updatecfgDict[0] and updatecfgDict[0][0]: - print(updatecfgDict[0][0]) - clientCfg = dict (updatecfgDict[0][0].get('clientCfg')) - for key, value in clientCfg.items(): - self.cfg(key, value) + try: + if updatecfgDict and updatecfgDict[0] and updatecfgDict[0][0]: + clientCfg = dict (updatecfgDict[0][0].get('clientCfg')) + if clientCfg is not None: + for key, value in clientCfg.items(): + self.cfg(key, value) + except Exception as e: + pass tdLog.debug("psim is deployed and configured by %s" % (self.cfgPath)) -- GitLab