From f0ab4503d6204ede46fad1d7586ad5d655c1c6fa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 20 Jun 2010 13:47:36 +0200 Subject: testparm: Fix suppress prompt option. --- source4/scripting/bin/testparm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'source4/scripting/bin/testparm') 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) -- cgit