Skip to content

Commit

Permalink
fix: delete dict "default=" on ssh_client package, it is useless (#418)
Browse files Browse the repository at this point in the history
* fix: Progress bars should not be printed in silent mode

* add default for silent

* add default for silent

* delete dict "default=" on ssh_client package

* delete dict "default=" on ssh_client package

* delete dict "default=" on ssh_client package
  • Loading branch information
wayyoungboy authored Sep 4, 2024
1 parent 0849afd commit b6a238b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/ssh_client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
2 changes: 1 addition & 1 deletion common/ssh_client/remote_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit b6a238b

Please sign in to comment.