mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-14 08:31:13 +00:00
ubuntutools/pullpkg.py: convert -v to count, enable package-wide debug for -vv
This commit is contained in:
parent
90e8fe81e1
commit
87a09640ba
@ -127,8 +127,8 @@ class PullPkg(object):
|
|||||||
"'Pending' and 'Published' status will be searched.")
|
"'Pending' and 'Published' status will be searched.")
|
||||||
|
|
||||||
parser = ArgumentParser(epilog=epilog)
|
parser = ArgumentParser(epilog=epilog)
|
||||||
parser.add_argument('-v', '--verbose', action='store_true',
|
parser.add_argument('-v', '--verbose', action='count', default=0,
|
||||||
help="Print debug messages")
|
help="Increase verbosity/debug")
|
||||||
parser.add_argument('-d', '--download-only', action='store_true',
|
parser.add_argument('-d', '--download-only', action='store_true',
|
||||||
help="Do not extract the source package")
|
help="Do not extract the source package")
|
||||||
parser.add_argument('-m', '--mirror', action='append',
|
parser.add_argument('-m', '--mirror', action='append',
|
||||||
@ -345,6 +345,8 @@ class PullPkg(object):
|
|||||||
assert 'verbose' in options
|
assert 'verbose' in options
|
||||||
if options['verbose']:
|
if options['verbose']:
|
||||||
Logger.setLevel(logging.DEBUG)
|
Logger.setLevel(logging.DEBUG)
|
||||||
|
if options['verbose'] > 1:
|
||||||
|
logging.getLogger(__package__).setLevel(logging.DEBUG)
|
||||||
|
|
||||||
Logger.debug("pullpkg options: %s", options)
|
Logger.debug("pullpkg options: %s", options)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user