'Report one or more bugs to w3af\'s Github, submit data to server.'

def _report_exception(self, edata, eid, num, total):

    try:
        gh = GithubIssues(OAUTH_TOKEN)
        gh.login()
    except LoginFailed:
        msg = 'Failed    to    contact    github.com.    Please    try    again    later.'
        om.out.console(msg)
    except OAuthTokenInvalid:
        om.out.console(OAUTH_AUTH_FAILED)
    else:
        traceback_str = edata.traceback_str
        desc = edata.get_summary()
        plugins = edata.enabled_plugins
        summary = str(edata.exception)
        (ticket_id, ticket_url) = gh.report_bug(summary, desc, tback=traceback_str, plugins=plugins)
        if (ticket_id is None):
            fmt = '                [%s/%s]    Failed    to    report    bug    with    id    %s.'
            msg = (fmt % (num, total, eid))
        else:
            fmt = '                [%s/%s]    Bug    with    id    %s    reported    at    %s'
            msg = (fmt % (num, total, eid, ticket_url))
        om.out.console(str(msg))
