[entropy.transceivers.{ssh,ftp}] respect silent mode if enabled

This commit is contained in:
Fabio Erculiani
2011-10-15 15:13:15 +02:00
parent da517f7d44
commit 451fd7234f
2 changed files with 7 additions and 2 deletions

View File

@@ -286,7 +286,9 @@ class EntropyFtpUriHandler(EntropyUriHandler):
self.__transfersize += buf_len
def _update_progress(self, force = False):
if self._silent:
# stfu !
return
upload_percent = 100.0
upload_size = round(self.__filekbcount, 1)
@@ -671,4 +673,4 @@ class EntropyFtpUriHandler(EntropyUriHandler):
def close(self):
""" just call our disconnect method """
self._disconnect()
self._disconnect()

View File

@@ -136,6 +136,9 @@ class EntropySshUriHandler(EntropyUriHandler):
self.output(current_txt, back = True, header = " ")
def _update_progress(self, std_r):
if self._silent:
# stfu !
return
read_buf = ""
try:
char = std_r.read(1)