def uninstallProg(self): '''Uninstall this program''' apiDict = self.clVars.Get("cl_api") if __app__ in apiDict: apiDict.pop(__app__) self.clVars.Write("cl_api", force=True) if not removeProgramToEnvFile(__app__, self.clVars): self.printERROR(_("Can not remove '%s' to %s")%(__app__, self.clVars.Get("cl_env_path")[0])) return False self.printOK(_("Delete install variables")) return True
def uninstallProg(self): """Наложение шаблонов на систему при деинсталяции""" # Проверяем на root if not self.isRoot(): return False # Действие деинсталяция self.clVars.Set("cl_action", "uninstall", True) if not self.applyTemplatesFromSystem(): self.printERROR(_("Failed to apply uninstall templates")) return False # Удаление программы из инсталяционной переменной if not removeProgramToEnvFile(__app__, self.clVars): self.printERROR( _("Failed to remove '%(app)s' from %(path)s") % {"app": __app__, "path": self.clVars.Get("cl_env_path")[0]} ) return False self.printOK(_("Uninstall templates applied")) return True