merge #5474: add '-w/--warning' command-line option
This commit is contained in:
@@ -113,7 +113,7 @@ def main():
|
||||
|
||||
# loglevels
|
||||
output.configure_logging(args.loglevel)
|
||||
if args.loglevel >= logging.ERROR:
|
||||
if args.loglevel >= logging.WARNING:
|
||||
config.set(("output",), "mode", "null")
|
||||
config.set(("downloader",), "progress", None)
|
||||
elif args.loglevel <= logging.DEBUG:
|
||||
|
||||
@@ -249,6 +249,12 @@ def build_parser():
|
||||
action="store_const", const=logging.ERROR,
|
||||
help="Activate quiet mode",
|
||||
)
|
||||
output.add_argument(
|
||||
"-w", "--warning",
|
||||
dest="loglevel",
|
||||
action="store_const", const=logging.WARNING,
|
||||
help="Print only warnings and errors",
|
||||
)
|
||||
output.add_argument(
|
||||
"-v", "--verbose",
|
||||
dest="loglevel",
|
||||
|
||||
Reference in New Issue
Block a user