file name information if option is not found
This commit is contained in:
parent
cbd1081371
commit
b049cb9324
|
@ -50,7 +50,7 @@ class GroupAnnotator:
|
||||||
if group.leader in cache_paths:
|
if group.leader in cache_paths:
|
||||||
leader_fam_path = cache_paths[group.leader]
|
leader_fam_path = cache_paths[group.leader]
|
||||||
else:
|
else:
|
||||||
leader_fam_path = self.objectspace.paths.get_variable_family_path(group.leader)
|
leader_fam_path = self.objectspace.paths.get_variable_family_path(group.leader, group.xmlfiles)
|
||||||
cache_paths[group.leader] = leader_fam_path
|
cache_paths[group.leader] = leader_fam_path
|
||||||
follower_names = list(group.follower.keys())
|
follower_names = list(group.follower.keys())
|
||||||
leader = self.objectspace.paths.get_variable(group.leader)
|
leader = self.objectspace.paths.get_variable(group.leader)
|
||||||
|
|
|
@ -297,7 +297,7 @@ class ServiceAnnotator:
|
||||||
msg = _(f'ip with ip_type "{variable.type}" must have netmask')
|
msg = _(f'ip with ip_type "{variable.type}" must have netmask')
|
||||||
raise DictConsistencyError(msg, 64, ip.xmlfiles)
|
raise DictConsistencyError(msg, 64, ip.xmlfiles)
|
||||||
if hasattr(ip, 'netmask'):
|
if hasattr(ip, 'netmask'):
|
||||||
netmask = self.objectspace.paths.get_variable(ip.netmask)
|
netmask = self.objectspace.paths.get_variable(ip.netmask, ip.xmlfiles)
|
||||||
if netmask.type != 'netmask':
|
if netmask.type != 'netmask':
|
||||||
msg = _(f'netmask in ip must have type "netmask", not "{netmask.type}"')
|
msg = _(f'netmask in ip must have type "netmask", not "{netmask.type}"')
|
||||||
raise DictConsistencyError(msg, 65, ip.xmlfiles)
|
raise DictConsistencyError(msg, 65, ip.xmlfiles)
|
||||||
|
|
|
@ -187,10 +187,11 @@ class Path:
|
||||||
|
|
||||||
def get_variable_family_path(self,
|
def get_variable_family_path(self,
|
||||||
name: str,
|
name: str,
|
||||||
|
xmlfiles: List[str]=False,
|
||||||
) -> str: # pylint: disable=C0111
|
) -> str: # pylint: disable=C0111
|
||||||
"""Get the full path of a family
|
"""Get the full path of a family
|
||||||
"""
|
"""
|
||||||
return self._get_variable(name)['family']
|
return self._get_variable(name, xmlfiles=xmlfiles)['family']
|
||||||
|
|
||||||
def get_variable_path(self,
|
def get_variable_path(self,
|
||||||
name: str,
|
name: str,
|
||||||
|
|
Loading…
Reference in New Issue