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.
This commit is contained in:
Rob Crittenden
2010-06-03 17:07:24 -04:00
parent 4924270b45
commit 1dd7b11b0b
5 changed files with 12 additions and 9 deletions

View File

@@ -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',