From: Fredrik Tolf Date: Mon, 7 Jan 2013 06:22:57 +0000 (+0100) Subject: Fixed sshsocket bug. X-Git-Tag: 0.2~4 X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=e3250828c55a4795bfd7ca03d3ef52c56e843252;hp=64f81f01cc99f24467290db6c9be607a61a3c25e;p=pdm.git Fixed sshsocket bug. --- diff --git a/pdm/sshsock.py b/pdm/sshsock.py index 44fd113..d96f4ff 100644 --- a/pdm/sshsock.py +++ b/pdm/sshsock.py @@ -17,6 +17,14 @@ class sshsocket(object): raise socket.error("unexpected reply from %s: %r" % (host, head)) head = self.recv(1) if head == "+": + buf = "" + while True: + r = self.recv(1) + if r == "": + raise socket.error("unexpected EOF in SSH socket stream") + elif r == "\n": + break + buf += r return elif head == "-": buf = ""