def launch(data): (title, attachment_path, app, attachment_name, folder, item_id) = data msg = 'Downloaded share: {}'.format(title) logger.info(msg) launch_project(app, attachment_name, folder) _report_share_opened(item_id)
def launch(app_name): if app_name is not None: try: if check_installed(app_name): launch_project(app_name, '', '') except ValueError: logger.error("Failed to launch app '{}'".format(str(app_name)))
def launch(app_name, background=False): if app_name is not None: try: if check_installed(app_name): launch_project(app_name, '', '', background=background) except ValueError: logger.error("Failed to launch app '{}'".format(str(app_name)))
def launch(data): if data: (title, attachment_path, app, attachment_name, folder, item_id) = data msg = 'Downloaded share: {}'.format(title) logger.info(msg) launch_project(app, attachment_name, folder) report_share_opened(item_id) else: logger.error("Share hook launch failed")
def launch(data, background=False): if data: (title, attachment_path, app, attachment_name, folder, item_id) = data msg = "Downloaded share: {}".format(title) logger.info(msg) if check_installed(app): launch_project(app, attachment_name, folder, background=background) report_share_opened(item_id) else: logger.error("Share hook launch failed")
def test_open_pong_share(self): app_name='make-pong' from kano_profile.apps import launch_project self._start_fake_webapp(app_name) # ask Kano Profile to open a share, instead of starting a new app instance launch_project(app_name, fake_xml, os.path.dirname(fake_xml), background=True) time.sleep(3) self._stop_fake_webapp() self.assertFalse(self._find_x11_app(app_name), msg="Pong unexpectedly running")
def load(self, _button, app, filename, data_dir): hourglass_start(app) rc = launch_project(app, filename, data_dir) if not rc == 0: hourglass_end()