Exemple #1
0
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)
Exemple #2
0
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)))
Exemple #3
0
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)))
Exemple #4
0
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")
Exemple #5
0
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")
Exemple #7
0
 def load(self, _button, app, filename, data_dir):
     hourglass_start(app)
     rc = launch_project(app, filename, data_dir)
     if not rc == 0:
         hourglass_end()