use ui_eval_param to convert param from string to actual bool. And, docstring. Signed-off-by: Andy Grover <agrover@xxxxxxxxxx> --- targetcli/ui_root.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/targetcli/ui_root.py b/targetcli/ui_root.py index 80181c6..78ca3fe 100644 --- a/targetcli/ui_root.py +++ b/targetcli/ui_root.py @@ -115,12 +115,14 @@ class UIRoot(UINode): self.refresh() - def ui_command_clearconfig(self, confirm=False): + def ui_command_clearconfig(self, confirm=None): ''' - Attempts to remove entire configuration of backstores and targets + Removes entire configuration of backstores and targets ''' self.assert_root() + confirm = self.ui_eval_param(confirm, 'bool', False) + RTSRoot().clear_existing(confirm=confirm) self.shell.log.info("All configuration cleared") -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html