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
# ==================================================================================================================
评论列表
文章目录