diff --git a/pyghmi/ipmi/console.py b/pyghmi/ipmi/console.py index 92be4751..28514fc4 100644 --- a/pyghmi/ipmi/console.py +++ b/pyghmi/ipmi/console.py @@ -154,8 +154,13 @@ class Console(object): return session.Session.wait_for_rsp(timeout=timeout) def _sendpendingoutput(self): - self._sendoutput(self.pendingoutput) - self.pendingoutput = "" + if len(self.pendingoutput) > self.maxoutcount: + chunk = self.pendingoutput[:self.maxoutcount] + self.pendingoutput = self.pendingoutput[self.maxoutcount:] + else: + chunk = self.pendingoutput + self.pendingoutput = "" + self._sendoutput(chunk) def _sendoutput(self, output): self.myseq += 1