Ejemplo n.º 1
0
def feedback():
    panel = ui.LinearLayoutWidget()
    panel.add(
        ui.Label(
            'Leaving comments with logs will help me diagnose\npotential problems with game speed and\nunexpected behaviour.'
        ))
    panel.add(
        ui.Button('Leave a comment with a log (preferred)',
                  lambda: sync.comment(sync.get_install_time(), True)))
    panel.add(
        ui.Button('Leave a comment without a log',
                  lambda: sync.comment(sync.get_install_time(), False)))
    ui.set(panel)
Ejemplo n.º 2
0
def maybe_notify_about_launch():
    token = features.get('app.launch_token')
    if token:
        ui. async (
            lambda: sync.request('/play/notify',
                                 token=token,
                                 install_time=str(sync.get_install_time())))
Ejemplo n.º 3
0
def run_autoupdate():
    install_time = sync.get_install_time()
    try:
        sync.client().updates(install_time)
    except sync.civsync.UpdateRequiredError as err:
        notify_update(err.url)
    except Exception as err:
        print 'Failed to autoupdate:', err
Ejemplo n.º 4
0
def run_autoupdate():
    install_time = sync.get_install_time()
    try:
        sync.client().updates(install_time)
    except sync.civsync.UpdateRequiredError as err:
        notify_update(err.url)
    except Exception as err:
        print 'Failed to autoupdate:', err
Ejemplo n.º 5
0
def raven_report(dsn, exc_info=None):
    import ravensimple
    print 'Raven: report exception to', dsn
    exc_type, exc_val, tb = exc_info or sys.exc_info()
    meta = {
        'install_time': sync.get_install_time(),
        'version': features.get('civsync.ua'),
    }
    ui. async (
        lambda: ravensimple.report_exception(exc_val, tb, dsn=dsn, extra=meta))
Ejemplo n.º 6
0
def run_autoupdate():
    install_time = sync.get_install_time()
    try:
        sync.updates(install_time)
    except sync.UpdateRequiredError as err:
        notify_update(err.url)
    except Exception as err:
        print 'Failed to autoupdate:', err
        import traceback
        traceback.print_exc()

    gold.maybe_check_products()
Ejemplo n.º 7
0
def run_autoupdate():
    install_time = sync.get_install_time()
    try:
        sync.updates(install_time)
    except sync.UpdateRequiredError as err:
        notify_update(err.url)
    except Exception as err:
        print 'Failed to autoupdate:', err
        import traceback
        traceback.print_exc()

    gold.maybe_check_products()
Ejemplo n.º 8
0
def raven_report(dsn, exc_info=None):
    import ravensimple
    print 'Raven: report exception to', dsn
    exc_type, exc_val, tb = exc_info or sys.exc_info()
    meta = {
        'install_time': sync.get_install_time(),
        'version': features.get('civsync.ua'),
    }
    ui.async(lambda:
             ravensimple.report_exception(
                 exc_val, tb,
                 dsn=dsn, extra=meta))
Ejemplo n.º 9
0
def maybe_notify_about_launch():
    token = features.get('app.launch_token')
    if token:
        ui.async(lambda: sync.request('/play/notify',
                                      token=token,
                                      install_time=str(sync.get_install_time())))
Ejemplo n.º 10
0
def feedback():
    panel = ui.LinearLayoutWidget()
    panel.add(ui.Label('Leaving comments with logs will help me diagnose\npotential problems with game speed and\nunexpected behaviour.'))
    panel.add(ui.Button('Leave a comment with a log (preferred)', lambda: sync.comment(sync.get_install_time(), True)))
    panel.add(ui.Button('Leave a comment without a log', lambda: sync.comment(sync.get_install_time(), False)))
    ui.set(panel)