This repository was archived by the owner on Feb 28, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,14 +167,12 @@ def check_for_daemons(parameters):
167167 if re .search (r"dbdmn.{0,}" , value ):
168168 for unit in device :
169169 for param in unit :
170- found_param_base = False
171- for attrib , value in param .items ():
172- if attrib == namespace_extra + "param" is not None :
173- base = re .search (r".{4}" , value )
174- if os .path .exists ("/opt/szarp/" + base .group (0 )):
175- found_param_base = True
176- if found_param_base is False :
177- printerr ("extra:param base doesn't exist (line " + str (param .sourceline ) + ")" )
170+ param_path = param .get (namespace_extra + "param" )
171+ if param_path is not None :
172+ base = re .search (r"(?P<base>[^:]*):" , param_path ).group ("base" )
173+ base_path = "/opt/szarp/" + base
174+ if not os .path .exists (base_path ):
175+ printerr ("extra:param base '%s' doesn't exist (line %d)" % (base , param .sourceline ))
178176
179177def check_send_elements (parameters ):
180178 namespace = "{http://www.praterm.com.pl/SZARP/ipk}"
You can’t perform that action at this time.
0 commit comments