pluginManager.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:PluginManager 作者: mandeeps708 项目源码 文件源码
def install(self, plugin):
        "Installs a GitHub plugin"

        print("Installing...", plugin.name)
        import git

        # Clone the GitHub repository via the URL.
        # git.Git().clone(str(plugin.baseurl), install_dir)

        # Checks if the plugin installation path already exists.
        if not self.isInstalled(plugin):
            """Clone the GitHub repository via Plugin URL to install_dir and
            with depth=1 (shallow clone).
            """
            git.Repo.clone_from(plugin.baseurl, self.install_dir, depth=1)
            print("Done!")
            return True

        else:
            print("Plugin already installed!")
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号