diff --git a/common/ssh_client/base.py b/common/ssh_client/base.py index 81cb184a..3d235863 100644 --- a/common/ssh_client/base.py +++ b/common/ssh_client/base.py @@ -54,7 +54,7 @@ def get_ip(self): return self.client.get_ip() def progress_bar(self, transferred, to_be_transferred, suffix=''): - if self.inner_config_manager.get("obdiag", default={"logger": {"silent": False}}).get("logger").get("silent"): + if self.inner_config_manager.get("obdiag", {}).get("logger", {}).get("silent") or False: return bar_len = 20 filled_len = int(round(bar_len * transferred / float(to_be_transferred))) diff --git a/common/ssh_client/remote_client.py b/common/ssh_client/remote_client.py index 04717dc3..ffcc5587 100644 --- a/common/ssh_client/remote_client.py +++ b/common/ssh_client/remote_client.py @@ -113,7 +113,7 @@ def download(self, remote_path, local_path): self._sftp_client.close() def progress_bar(self, transferred, to_be_transferred, suffix=''): - if self.inner_config_manager.get("obdiag", default={"logger": {"silent": False}}).get("logger").get("silent"): + if self.inner_config_manager.get("obdiag", {}).get("logger", {}).get("silent") or False: return bar_len = 20 filled_len = int(round(bar_len * transferred / float(to_be_transferred)))