mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix docstring construction in alias_function when Salt installed using -OO
This removes the docstring, so fun.__doc__ is None, which raises an exception when we try to concatenate these.
This commit is contained in:
parent
6929423528
commit
90c90f5d5c
1 changed files with 1 additions and 1 deletions
|
@ -2360,7 +2360,7 @@ def alias_function(fun, name, doc=None):
|
|||
orig_name = fun.__name__
|
||||
alias_msg = ('\nThis function is an alias of '
|
||||
'``{0}``.\n'.format(orig_name))
|
||||
alias_fun.__doc__ = alias_msg + fun.__doc__
|
||||
alias_fun.__doc__ = alias_msg + (fun.__doc__ or '')
|
||||
|
||||
return alias_fun
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue