MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / DepsInstallProgress

Class DepsInstallProgress

src/astroprint/software.py:67–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66
67 class DepsInstallProgress(apt.progress.base.InstallProgress):
68 def __init__(self, progressCb, completionCb):
69 super(DepsInstallProgress, self).__init__()
70
71 self._progressCb = progressCb
72 self._completionCb = completionCb
73 self._logger = logging.getLogger(__name__)
74
75 def start_update(self):
76 self._logger.info("Dependency installation started")
77 self._progressCb("deps_install", 0.0 )
78
79 def error(self, pkg, message):
80 self._logger.error("Error during dependency [%s] installation: %s" % (pkg, message))
81 self._completionCb(False)
82
83 def status_change(self, pkg, percent, status):
84 #self._logger.info("Dependency installation progress [%.2f %%] - %s" % (percent, status))
85 self._progressCb("deps_install", ( percent / 100 ) )
86
87 def finish_update(self):
88 self._logger.info("Finished installing dependencies")
89 self._progressCb("deps_install", 1.0 )
90
91
92 class UpdateProgress(apt.progress.base.InstallProgress):

Callers 1

_installPackageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected