summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-07-05 13:03:18 +1000
committerAndrew Tridgell <tridge@samba.org>2011-07-05 08:22:40 +0200
commitc9a6dd56e42beafd297f4aefeb4e00ef9a09073a (patch)
tree14488391f127dc50ead8447caad86b6ea9c4fe67 /source4/scripting/python
parentbce1be36dca87bea3b1bdbad86a8265fa1d4bed9 (diff)
downloadsamba-c9a6dd56e42beafd297f4aefeb4e00ef9a09073a.tar.gz
samba-c9a6dd56e42beafd297f4aefeb4e00ef9a09073a.tar.bz2
samba-c9a6dd56e42beafd297f4aefeb4e00ef9a09073a.zip
s4-dbcheck: support the 'none' option for prompts
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Jul 5 08:22:40 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/dbchecker.py12
1 files changed, 10 insertions, 2 deletions
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