subprocess freeze with rsync on windows

W

William Dode

Hi,

I try to call rsync (with ssh) with subprocess but _some times_ it
freeze without traceback, without any reason.

My code look like that :
def sh(self,cmd):
log.debug("S cmd: " + " ".join(cmd))
p = Popen(cmd, stdout = PIPE, stderr = PIPE)
stdout, stderr = p.communicate()
if stdout:
log.debug("S ret: %s" % stdout)
if stderr:
log.error("S err: %s" % stderr)
return p.returncode

When it freeze i need to kill the ms-dos console by hand.
I've no problem on linux with the same script.

thanks

the complet script (doing rsync and cp -al on the remote side) is
available freely here : http://flibuste.net/libre/snapy (but
documentation is in french)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top