python类py()的实例源码

workflow.py 文件源码 项目:alfred-mpd 作者: deanishe 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:workflows.kyoyue 作者: wizyoung 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:GoToMeetingTools 作者: plongitudes 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:radar 作者: amoose136 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data: %r', update_data)

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfred-bear 作者: chrisbro 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfred-confluence 作者: skleinei 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfred_reviewboard 作者: lydian 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data: %r', update_data)

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfred-moeha 作者: moeHa 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:simplingua-workflow 作者: bydmm 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data: %r', update_data)

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfred-baidu-translate 作者: ketor 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:jisho-alfred-workflow 作者: janclarin 项目源码 文件源码 阅读 93 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:Dotfiles 作者: Akin909 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data: %r', update_data)

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfredToday 作者: jeeftor 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data: %r', update_data)

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:EmojiTaco 作者: jeeftor 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data: %r', update_data)

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:qiniu-blog-deploy 作者: Panmax 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfred-fixum 作者: deanishe 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data: %r', update_data)

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:iShanbay 作者: ghuiii 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data: %r', update_data)

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfred-crypto-tracker 作者: rhlsthrm 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:Ruter-workflow-for-Alfred 作者: kimsyversen 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def update_available(self):
        """Whether an update is available.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available, else ``False``

        """
        # Create a new workflow object to ensure standard serialiser
        # is used (update.py is called without the user's settings)
        update_data = Workflow().cached_data('__workflow_update_status',
                                             max_age=0)

        self.logger.debug('update_data : {0}'.format(update_data))

        if not update_data or not update_data.get('available'):
            return False

        return update_data['available']
workflow.py 文件源码 项目:alfred-mpd 作者: deanishe 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:workflows.kyoyue 作者: wizyoung 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:GoToMeetingTools 作者: plongitudes 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:radar 作者: amoose136 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:alfred-workflows 作者: arthurhammer 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:alfred-bear 作者: chrisbro 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:alfred-confluence 作者: skleinei 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:alfred_reviewboard 作者: lydian 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:MathKernelToggle 作者: LingyuanJi 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """

        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:alfred-moeha 作者: moeHa 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`manual-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################
workflow.py 文件源码 项目:simplingua-workflow 作者: bydmm 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def start_update(self):
        """Check for update and download and install new workflow file.

        .. versionadded:: 1.9

        See :ref:`guide-updates` in the :ref:`user-manual` for detailed
        information on how to enable your workflow to update itself.

        :returns: ``True`` if an update is available and will be
            installed, else ``False``

        """
        import update

        github_slug = self._update_settings['github_slug']
        # version = self._update_settings['version']
        version = str(self.version)

        if not update.check_update(github_slug, version, self.prereleases):
            return False

        from background import run_in_background

        # update.py is adjacent to this file
        update_script = os.path.join(os.path.dirname(__file__),
                                     b'update.py')

        cmd = ['/usr/bin/python', update_script, 'install', github_slug,
               version]

        if self.prereleases:
            cmd.append('--prereleases')

        self.logger.debug('Downloading update ...')
        run_in_background('__workflow_update_install', cmd)

        return True

    ####################################################################
    # Keychain password storage methods
    ####################################################################


问题


面经


文章

微信
公众号

扫码关注公众号