def convert_string(self, rest):
        """Convert a reST string to an HTML string.
        """
        try:
            html = publish_string(rest, writer_name='html')
        except SystemExit as e:
            err_exit('HTML conversion failed with error: %s' % e.code)
        else:
            if sys.version_info[0] >= 3:
                return html.decode('utf-8')
            return html
def convert_string ( self , rest ) : try : html = publish_string ( rest , writer_name = 'html' ) except SystemExit as e : err_exit ( 'HTML conversion failed with error: %s' % e . code ) else : if sys . version_info [ 0 ] >= 3 : return html . decode ( 'utf-8' ) return html
Convert a reST string to an HTML string.