From 432caaf3f44074ef0467c12a666af6826a3d659f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B0=D0=BC=D0=BE=D1=83=D0=BA=D0=B8=D0=BD=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= Date: Wed, 13 Oct 2010 10:52:19 +0400 Subject: [PATCH] Modified method of printing variables. Added to the variables used from the library module. --- pym/cl_share_cmd.py | 7 ++++++- pym/cl_vars_ldap.py | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pym/cl_share_cmd.py b/pym/cl_share_cmd.py index df82189..e1cf764 100644 --- a/pym/cl_share_cmd.py +++ b/pym/cl_share_cmd.py @@ -43,7 +43,12 @@ class share_cmd(color_print, _error): varsNames.append(optCmd) if optObj.xml: format = "xml" - self.logicObj.printVars(varsFilter, varsNames, outFormat=format) + try: + v = int(optObj.v) + except: + v = 1 + self.logicObj.printVars(varsFilter, varsNames, outFormat=format, + verbose=v) def setVars(self, optObj): """Установка переменных""" diff --git a/pym/cl_vars_ldap.py b/pym/cl_vars_ldap.py index 7bcb482..76a5a0a 100644 --- a/pym/cl_vars_ldap.py +++ b/pym/cl_vars_ldap.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from cl_ldap_service import __version__, __app__ class Data: #базовый суффикс LDAP @@ -68,10 +69,15 @@ class Data: sr_ldap_set = {'mode':"w",'value':'off'} # имя программы - cl_name = {'value':'calculate-ldap'} + cl_name = {'value':__app__} # версия программы - cl_ver = {'value':'2.2.0.0'} + cl_ver = {'value':__version__} # действие программа устанавливает сервис cl_ldap_setup_action = {'value':'down'} + + # lib vars + cl_pass_step = {} + cl_api = {} + cl_env_path = {}