Closed bradharmon closed 11 years ago
Apologies for not responding sooner, I've been without regular Internet access.
What is the output you're getting? What OS are you running this on? If it's Windows, do you have Paramiko installed, or are you relying on PuTTY?
I'm running on linux. It looks like what is happening is that the standard scp library is being used, however, when Popen is called, stdout and stderr don't get overridden with anything, so I see the standard scp output that shows a progress bar. And it overwrites anything that was already printed on that line. I finally figured out how to suppress the output, but it seems like output to stdout/stderr should automatically be suppressed within the library.
Here is the relevant code I am referring to in pushy pushy/transport/ssh.py:269
if is_windows or self.__password is None:
proc = subprocess.Popen(args, stdin=subprocess.PIPE)
else:
proc = pushy.util.askpass.Popen(args, self.__password,
stdin=subprocess.PIPE)
proc.stdin.close()
return proc.wait()
I see, thanks for that. I'm not sure about suppressing output altogether, in case important errors (or security warnings) get suppressed. Adding "-q" to the scp/pscp args will work for the success case.
whenever I use pushy's putfile method, I get output to stdout. Even redirecting stdout doesn't work: