diff --git a/dvc/cli.py b/dvc/cli.py index a40f2eb20..972e22959 100644 --- a/dvc/cli.py +++ b/dvc/cli.py @@ -56,13 +56,15 @@ class VersionAction(argparse.Action): # pragma: no cover def parse_args(argv=None): # Common args parent_parser = argparse.ArgumentParser(add_help=False) - parent_parser.add_argument( + + log_level_group = parent_parser.add_mutually_exclusive_group() + log_level_group.add_argument( '-q', '--quiet', action='store_true', default=False, help='Be quiet.') - parent_parser.add_argument( + log_level_group.add_argument( '-v', '--verbose', action='store_true', diff --git a/dvc/command/base.py b/dvc/command/base.py index 571f99a55..2a86c058b 100644 --- a/dvc/command/base.py +++ b/dvc/command/base.py @@ -15,9 +15,10 @@ class CmdBase(object): @staticmethod def _set_loglevel(args): - if args.quiet and not args.verbose: + if args.quiet: Logger.be_quiet() - elif not args.quiet and args.verbose: + + elif args.verbose: Logger.be_verbose() def _find_root(self):