def initialize(self): self._console_logger = logging.getLogger("octoprint.plugins.pluginmanager.console") self._repository_cache_path = os.path.join(self.get_plugin_data_folder(), "plugins.json") self._repository_cache_ttl = self._settings.get_int(["repository_ttl"]) * 60 self._pip_caller = PipCaller(configured=self._settings.get(["pip"])) self._pip_caller.on_log_call = self._log_call self._pip_caller.on_log_stdout = self._log_stdout self._pip_caller.on_log_stderr = self._log_stderr
def _get_pip_caller(command=None): key = command if command is None: key = "__default" if not key in _pip_callers: try: _pip_callers[key] = PipCaller(configured=command) except UnknownPip: _pip_callers[key] = None return _pip_callers[key]
def _get_pip_caller(command=None): key = command if command is None: key = "__default" if not key in _pip_callers: try: _pip_callers[key] = PipCaller(configured=command) _pip_callers[key].on_log_call = _log_call _pip_callers[key].on_log_stdout = _log_stdout _pip_callers[key].on_log_stderr = _log_stderr except UnknownPip: _pip_callers[key] = None return _pip_callers[key]