bug.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:plugin.video.stream-cinema 作者: bbaronSVK 项目源码 文件源码
def onExceptionRaised(extraData=None):
    """
    Invoke this method in an except clause to allow the user to submit
    a bug report with stacktrace, system information, etc.

    This also avoids the 'Script error' popup in XBMC, unless of course
    an exception is thrown in this code :-)

    @param extraData: str or dict
    """
    # start by logging the usual info to stderr
    (etype, value, traceback) = sys.exc_info()
    tb.print_exception(etype, value, traceback)

    if not SCRIPT_ADDON:
        try:
            # signal error to XBMC to hide progress dialog
            HANDLE = int(sys.argv[1])
            xbmcplugin.endOfDirectory(HANDLE, succeeded=False)
        except Exception:
            pass
        try:
            f = F(xbmc.translatePath('special://userdata/addon_data/plugin.video.stream-cinema/settings.xml'))
            sett = f.read(8129 * 10)
            f.close()
        except:
            sett = None
    else:
        sett = None

    heading = getRandomHeading()
    data = client.gatherData(etype, value, traceback, extraData, EXTRA_DATA)
    if set is not None:
        data['addon']['set'] = str(sett)

    d = gui.BuggaloDialog(SUBMIT_URL, GMAIL_RECIPIENT, heading, data)
    d.doModal()
    del d
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号