X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ssh%2Fpexpect.py;h=4eab532996b7453cb45fa0a75d8cfc7fe6445ee1;hb=ee740a3ff286a9720cd1656cd60a3c85f0f14b29;hp=19ee230230290c14353014084093820bd8d87448;hpb=fcbf7923a944e57c789a608b31fbb9b75ff712b1;p=monitor.git diff --git a/ssh/pexpect.py b/ssh/pexpect.py index 19ee230..4eab532 100644 --- a/ssh/pexpect.py +++ b/ssh/pexpect.py @@ -342,6 +342,7 @@ class spawn (object): self.env = env self.__irix_hack = sys.platform.lower().find('irix') >= 0 # This flags if we are running on irix self.use_native_pty_fork = not (sys.platform.lower().find('solaris') >= 0) # Solaris uses internal __fork_pty(). All other use pty.fork(). + self.allstr = "" # allow dummy instances for subclasses that may not use command or args. if command is None: @@ -1108,6 +1109,7 @@ class spawn (object): self.buffer = incoming[self.match.end() : ] self.before = incoming[ : self.match.start()] self.after = incoming[self.match.start() : self.match.end()] + #print "MATCH--", self.after, "--EOM" return self.match_index # No match at this point if timeout < 0 and timeout is not None: @@ -1116,6 +1118,8 @@ class spawn (object): c = self.read_nonblocking (self.maxread, timeout) time.sleep (0.0001) incoming = incoming + c + self.allstr += c + #print "INCOMING--", c, "--EOI" if timeout is not None: timeout = end_time - time.time() except EOF, e: