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)
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())))
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
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))
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()
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))
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())))
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)