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