1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-13 07:56:14 +01:00

cmdln: Fix hide() decorator to take an optional argument with a boolean value

To restore compatibility with the install plugin.
This commit is contained in:
Daniel Mach 2023-01-16 16:06:19 +01:00
parent c1f0cfa1b7
commit cb52884f86

View File

@ -61,7 +61,7 @@ def name(name):
return decorate
def hide():
def hide(value=True):
"""
For obsolete calls, hide them in help listings.
@ -72,7 +72,7 @@ def hide():
#...implement 'shell' command
"""
def decorate(f):
f.hidden = True
f.hidden = bool(value)
return f
return decorate