From cb52884f86956c208e50fd9bec5b2d4f57a2c208 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Mon, 16 Jan 2023 16:06:19 +0100 Subject: [PATCH] cmdln: Fix hide() decorator to take an optional argument with a boolean value To restore compatibility with the install plugin. --- osc/cmdln.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osc/cmdln.py b/osc/cmdln.py index 03257375..4394be59 100644 --- a/osc/cmdln.py +++ b/osc/cmdln.py @@ -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