(self, shell_output)
Drain final output from shell.
Drain final output from shell.
Drain final output from shell .
def _drain_final(self, shell_output):
        """Drain final output from shell."""
        if not shell_output:
            return
        elif not self._detect_encoding(shell_output):
            # one-char output, must be rare...
            shell_output.append(b'\r')
        elif not shell_output[-1] in (self._enc(u'\r'), self._enc(u'\n')):
            shell_output.append(self._enc(u'\r'))
        self._show_output(shell_output)
def _drain_final ( self , shell_output ) : if not shell_output : return elif not self . _detect_encoding ( shell_output ) : # one-char output, must be rare... shell_output . append ( b'\r' ) elif not shell_output [ - 1 ] in ( self . _enc ( u'\r' ) , self . _enc ( u'\n' ) ) : shell_output . append ( self . _enc ( u'\r' ) ) self . _show_output ( shell_output )