From 7fd4f635e193687d3cdbeed8b64f6895a3df5c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Mon, 29 Aug 2016 14:53:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/unix/variables/unix.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pym/unix/variables/unix.py b/pym/unix/variables/unix.py index e4637aa..bf97d93 100644 --- a/pym/unix/variables/unix.py +++ b/pym/unix/variables/unix.py @@ -103,6 +103,9 @@ class VariableClUnixPwGenerateSet(Variable): self.label = _("Generate new service password") self.help = _("generate new service password") + def uncompatible(self): + if self.Get('server.sr_unix_set') != 'on': + return "Unavailable for unconfigured Unix service" class VariableClUnixRemoveSet(Variable): """ @@ -122,3 +125,6 @@ class VariableClUnixRemoveSet(Variable): if self.Get('server.sr_unix_set') != 'on': raise VariableError(_("Unix service is not setup")) + def uncompatible(self): + if self.Get('server.sr_unix_set') != 'on': + return "Unavailable for unconfigured Unix service"