add follow_symlink when getting name of an option

This commit is contained in:
Emmanuel Garette 2019-01-18 14:15:42 +01:00
parent ca4d5e3e97
commit f018217b1e
1 changed files with 8 additions and 2 deletions

View File

@ -163,9 +163,15 @@ class _TiramisuOptionOptionDescription(CommonTiramisuOption):
option = self._option_bag.option option = self._option_bag.option
return option.impl_get_display_name() return option.impl_get_display_name()
def name(self): def name(self,
follow_symlink: bool=False) -> str:
"""Get option name""" """Get option name"""
return self._name if not follow_symlink or \
self.isoptiondescription() or \
not self.issymlinkoption():
return self._name
else:
return option.impl_getopt().impl_getname()
def path(self) -> str: def path(self) -> str:
"""Get option path""" """Get option path"""