From e3250828c55a4795bfd7ca03d3ef52c56e843252 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Mon, 7 Jan 2013 07:22:57 +0100 Subject: [PATCH 1/1] Fixed sshsocket bug. --- pdm/sshsock.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 = "" -- 2.11.0