summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-06-20 13:47:36 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-06-20 13:47:36 +0200
commitf0ab4503d6204ede46fad1d7586ad5d655c1c6fa (patch)
tree2a7be57589f76f93939127dc318b2149d7ee2f1e
parentc0e9a41f67f787f4fecec69dd661d92ecd24e608 (diff)
downloadsamba-f0ab4503d6204ede46fad1d7586ad5d655c1c6fa.tar.gz
samba-f0ab4503d6204ede46fad1d7586ad5d655c1c6fa.tar.bz2
samba-f0ab4503d6204ede46fad1d7586ad5d655c1c6fa.zip
testparm: Fix suppress prompt option.
-rwxr-xr-xsource4/scripting/bin/testparm12
1 files changed, 5 insertions, 7 deletions
diff --git a/source4/scripting/bin/testparm b/source4/scripting/bin/testparm
index 6d831635de..98f0c19a5e 100755
--- a/source4/scripting/bin/testparm
+++ b/source4/scripting/bin/testparm
@@ -101,11 +101,7 @@ def do_share_checks(lp, logger):
valid = False
return valid
-def dump(lp, section_name=None, parameter_name=None, silent_mode=False,
- show_defaults=False):
- if not silent_mode:
- print "Press enter to see a dump of your service definitions\n"
- sys.stdin.readline()
+def dump(lp, section_name=None, parameter_name=None, show_defaults=False):
if section_name is not None or parameter_name is not None:
if parameter_name is None:
lp[section_name].dump(sys.stdout, lp.default_service, show_defaults)
@@ -195,8 +191,10 @@ if __name__ == '__main__':
if cname is not None:
check_client_access(lp, cname, caddr)
else:
- dump(lp, opts.section_name, opts.parameter_name,
- not opts.suppress_prompt, opts.verbose or False)
+ if not opts.suppress_prompt:
+ print "Press enter to see a dump of your service definitions\n"
+ sys.stdin.readline()
+ dump(lp, opts.section_name, opts.parameter_name, opts.verbose or False)
if valid:
sys.exit(0)