Fixed exception on undocumented options.

This commit is contained in:
Salvador E. Tropea 2021-02-04 10:40:42 -03:00
parent cc19d12d60
commit 9807bcb13f
1 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,10 @@ class Optionable(object):
raise KiPlotConfigurationError("Option `{}` must be true/false".format(key))
def get_doc(self, name):
doc = getattr(self, '_help_'+name).strip()
try:
doc = getattr(self, '_help_'+name).strip()
except AttributeError:
return None, name, False
if doc[0] == '{':
alias = doc[1:-1]
return getattr(self, '_help_'+alias).strip(), alias, True