mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
Merge pull request #1213 from dmach/fix-cmdln-hide
cmdln: Fix hide() decorator to take an optional argument with a boolean value
This commit is contained in:
commit
62464025b6
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user