def do_render(self, error=None):
        # Clear the screen
        self.clear()

        # If we got an error, we'll use that as the body
        if error:
            self.body = self.colour(error, 'red')

        # Refresh the formatted body
        self.fmt_body = self.body

        # Pad and truncate the body
        self.pad_body()
        self.truncate_body()

        # Print the header, body and footer
        try:
            if self.config.header.show:
                print(self.format_header_footer(self.config.header))
            print(self.fmt_body, end='')
            if self.config.footer.show:
                print('\n' + self.format_header_footer(self.config.footer), end='')
            sys.stdout.flush()
        except __HOLE__ as e:
            # if we get an EINTR while printing, just do it again
            if e.errno == socket.EINTR:
                self.do_render()
dataset/ETHPy150Open snare/voltron/voltron/view.py/TerminalView.do_render