Fixed sshsocket bug.
authorFredrik Tolf <fredrik@dolda2000.com>
Mon, 7 Jan 2013 06:22:57 +0000 (07:22 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Mon, 7 Jan 2013 06:22:57 +0000 (07:22 +0100)
pdm/sshsock.py

index 44fd113..d96f4ff 100644 (file)
@@ -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 = ""