diff --git a/update/cl_update.py b/update/cl_update.py index 67ec6cb..cc9f362 100644 --- a/update/cl_update.py +++ b/update/cl_update.py @@ -92,4 +92,3 @@ class Update: """ self.initVars(datavars) return bool(self.applyTemplates()) - return True diff --git a/update/variables/update.py b/update/variables/update.py index 33f3763..e8034d3 100644 --- a/update/variables/update.py +++ b/update/variables/update.py @@ -39,17 +39,21 @@ class VariableClUpdateWorld(Variable): List of action update world, rebuild world, """ type = "choice" - opt = ["--world"] + opt = ["--(action)-world"] value = "" syntax = "--{choice}-world" metavalue = 'ACTION' + untrusted = True def init(self): self.help = "'update' - " +_("update world file") + \ ",\n'rebuild' - "+ _("rebuild world file") - self.label = _("World") + self.label = _("World action") + + def check(self,value): + if not value: + raise VariableError(_("Select action with world")) def choice(self): - return [("",_("None")), - ("update",_("Update world")), + return [("update",_("Update world")), ("rebuild","Rebuild world")]