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

View file

@ -163,9 +163,15 @@ class _TiramisuOptionOptionDescription(CommonTiramisuOption):
option = self._option_bag.option
return option.impl_get_display_name()
def name(self):
def name(self,
follow_symlink: bool=False) -> str:
"""Get option 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:
"""Get option path"""