mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 22:56:15 +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
|
return decorate
|
||||||
|
|
||||||
|
|
||||||
def hide():
|
def hide(value=True):
|
||||||
"""
|
"""
|
||||||
For obsolete calls, hide them in help listings.
|
For obsolete calls, hide them in help listings.
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ def hide():
|
|||||||
#...implement 'shell' command
|
#...implement 'shell' command
|
||||||
"""
|
"""
|
||||||
def decorate(f):
|
def decorate(f):
|
||||||
f.hidden = True
|
f.hidden = bool(value)
|
||||||
return f
|
return f
|
||||||
return decorate
|
return decorate
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user