From 1dd7b11b0b5697f86f4d486fbe9509484ae2065a Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 3 Jun 2010 17:07:24 -0400 Subject: Connect the -v cli argument to the verbose flag in xmlrpclib If you pass two -v to the ipa command you'll get the XML-RPC data in the output. This can be handy so you know exactly what went out over the wire. --- ipalib/plugable.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipalib/plugable.py') diff --git a/ipalib/plugable.py b/ipalib/plugable.py index ded762d1..397004eb 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -397,7 +397,7 @@ class API(DictProxy): stderr = logging.StreamHandler() if self.env.debug: stderr.setLevel(logging.DEBUG) - elif self.env.verbose: + elif self.env.verbose > 0: stderr.setLevel(logging.INFO) else: stderr.setLevel(logging.WARNING) @@ -444,8 +444,8 @@ class API(DictProxy): parser.add_option('-d', '--debug', action='store_true', help='Produce full debuging output', ) - parser.add_option('-v', '--verbose', action='store_true', - help='Produce more verbose output', + parser.add_option('-v', '--verbose', action='count', + help='Produce more verbose output. A second -v displays the XML-RPC request', ) if context == 'cli': parser.add_option('-a', '--prompt-all', action='store_true', -- cgit