diff --git a/i18n/cl_lib_ru.mo b/i18n/cl_lib_ru.mo index 06181a1..c6c3102 100644 Binary files a/i18n/cl_lib_ru.mo and b/i18n/cl_lib_ru.mo differ diff --git a/pym/cl_opt.py b/pym/cl_opt.py index 8694692..33bb566 100644 --- a/pym/cl_opt.py +++ b/pym/cl_opt.py @@ -278,7 +278,7 @@ class opt(optparse.OptionParser): [{'longOption':"set", 'optVal':"VAR=VALUE", 'action':'append', - 'help':_("set value for variable (comma - delimeter)") + 'help':_("set value for variable") }, {'shortOption':"v", 'longOption':"vars", @@ -371,7 +371,7 @@ is used in conjunction with the option '-v --vars'") def checkVarSyntax(self,values): """Check value of parameter set, was used for change vars""" - reCheckSet = re.compile("^[0-9a-z_]+=[^,]*(,[0-9a-z_]+=[^,]*)*$") + reCheckSet = re.compile("^[0-9a-z_]+=.*$") if values.set: for val in values.set: if not reCheckSet.match(val): diff --git a/pym/cl_utils.py b/pym/cl_utils.py index 4414794..606cbc9 100644 --- a/pym/cl_utils.py +++ b/pym/cl_utils.py @@ -578,12 +578,18 @@ def removeDir(rmDir): def getRunCommands(): """List run program""" + def getCmd(procNum): + cmdLineFile = '/proc/%s/cmdline'%procNum + try: + if os.path.exists(cmdLineFile): + return open(cmdLineFile,'r').read().strip() + except: + pass + return "" if not os.access('/proc',os.R_OK): return [] - return map(lambda x:open('/proc/%s/cmdline'%x).read().strip() \ - if os.path.exists('/proc/%s/cmdline') else "", - filter(lambda x:x.isdigit(), - os.listdir('/proc'))) + return map(getCmd,filter(lambda x:x.isdigit(), + os.listdir('/proc'))) def isFstabMount(pathname): """Get mount point or device from fstab"""