Exemplo n.º 1
0
def crashreporter_push_symbolicated():
    data = request.stream.read()
    buf = cStringIO.StringIO(data)
    zf = zipfile.ZipFile(buf, 'r')
    for i in zf.infolist():
        key, ext = os.path.splitext(i.filename)
        contents = zf.read(i.filename)
        cr = CrashReport.get(key)
        if cr is not None:
            if ext == '' and not cr.symbolicated:
                cr.symbolicated = True
                cr.symbolicated_data = contents
            elif ext == '.plist':
                d = BPlistReader.plistWithString(contents)
                query = BetaRelease.all()
                query.filter('gitrev =', d.get('MumbleGitRevision', None))
                query.filter('build_date =', d.get('MumbleBuildDate', None))
                br = query.get()
                if br is not None:
                    cr.betarelease = br
            cr.save()
    zf.close()

    return ''
Exemplo n.º 2
0
def view_crashreport(key):
    cr = CrashReport.get(key)
    if cr is None:
        abort(404)
    return Response(cr.symbolicated_data, mimetype='text/plain')