diff options
| author | Adam Olech <nddr89@gmail.com> | 2021-06-23 19:12:34 +0200 |
|---|---|---|
| committer | Adam Olech <nddr89@gmail.com> | 2021-06-23 19:12:34 +0200 |
| commit | 49356a3b6b803e517ff35190a87d071939b39d40 (patch) | |
| tree | 25fb52d6d4d2104c128c868e37239bca939a1c10 /tar_over_paramiko.py | |
| parent | fdebe619477570d28d522345956ef10d2acfd7cf (diff) | |
Print received bytes
Diffstat (limited to 'tar_over_paramiko.py')
| -rwxr-xr-x | tar_over_paramiko.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tar_over_paramiko.py b/tar_over_paramiko.py index 42ed69f..797a931 100755 --- a/tar_over_paramiko.py +++ b/tar_over_paramiko.py @@ -47,11 +47,15 @@ tar_data = io.BytesIO() tar_file = open('/tmp/tartest', 'wb') for l in stdout: - tar_data.write(l.encode()) - tar_file.write(l.encode()) + l_byte = l.encode() + tar_data.write(l_byte) + tar_file.write(l_byte) + stdout_lines += 1 stdout_type = type(l) + print('[TAR{}]\tReceived {} bytes'.format(stdout_lines, len(l_byte))) + for l in stderr: print("[STDERR]\t{}".format(l.strip('\n'))) stderr_lines += 1 |
