From c9a6dd56e42beafd297f4aefeb4e00ef9a09073a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 5 Jul 2011 13:03:18 +1000 Subject: s4-dbcheck: support the 'none' option for prompts Pair-Programmed-With: Amitay Isaacs Autobuild-User: Andrew Tridgell Autobuild-Date: Tue Jul 5 08:22:40 CEST 2011 on sn-devel-104 --- source4/scripting/python/samba/dbchecker.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/python/samba/dbchecker.py b/source4/scripting/python/samba/dbchecker.py index 6a334f40ab..4209a3b78c 100644 --- a/source4/scripting/python/samba/dbchecker.py +++ b/source4/scripting/python/samba/dbchecker.py @@ -100,10 +100,18 @@ class dbcheck(object): return False if self.quiet: return self.yes - forced = self.yes or getattr(self, all_attr) + if getattr(self, all_attr) == 'NONE': + return False + if getattr(self, all_attr) == 'ALL': + forced = True + else: + forced = self.yes c = common.confirm(msg, forced=forced, allow_all=True) if c == 'ALL': - setattr(self, all_attr, True) + setattr(self, all_attr, 'ALL') + return True + if c == 'NONE': + setattr(self, all_attr, 'NONE') return True return c -- cgit