Пример #1
0
    def downgrade(self, pkg: SnapApplication, root_password: str,
                  watcher: ProcessWatcher) -> bool:
        if not snap.is_installed():
            watcher.print("'snap' seems not to be installed")
            return False
        if not snapd.is_running():
            watcher.print("'snapd' seems not to be running")
            return False

        return ProcessHandler(watcher).handle_simple(
            snap.downgrade_and_stream(pkg.name, root_password))[0]
Пример #2
0
 def downgrade(self, pkg: SnapApplication, root_password: str,
               watcher: ProcessWatcher) -> bool:
     return ProcessHandler(watcher).handle(
         SystemProcess(subproc=snap.downgrade_and_stream(
             pkg.name, root_password),
                       wrong_error_phrase=None))