dependency_installer.py 文件源码

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

项目:needle 作者: mwrlabs 项目源码 文件源码
def _configure_tool(self, toolname):
        """Check if the specified tool is already on the device, otherwise install it."""
        # Retrieve install options
        tool = Constants.DEVICE_SETUP['TOOLS'][toolname]
        try:
            if tool['PACKAGES']:
                # Install via apt-get
                self.__install_package(toolname, tool)
            elif tool['LOCAL']:
                # Manual install
                self.__install_local(toolname, tool)
            elif tool['SETUP']:
                # Use list of commands
                self.__install_commands(toolname, tool)
            else:
                self.device.printer.debug('Installation method not provided for %s. Skipping' % toolname)
        except Exception as e:
            self.device.printer.warning('Error occurred during installation of tools: %s' % e.message.strip())
            self.device.printer.warning('Trying to continue anyway...')

    # ==================================================================================================================
    # RUN
    # ==================================================================================================================
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号