def ProcessCommonOptions(args): """Processes and handles all common options.""" run_tests_helper.SetLogLevel(args.verbose_count, add_handler=False) handler = logging_utils.ColorStreamHandler() handler.setFormatter(run_tests_helper.CustomFormatter()) logging.getLogger().addHandler(handler) constants.SetBuildType(args.build_type) if args.output_directory: constants.SetOutputDirectory(args.output_directory)
def ProcessCommonOptions(args): """Processes and handles all common options.""" run_tests_helper.SetLogLevel(args.verbose_count, add_handler=False) # pylint: disable=redefined-variable-type if args.verbose_count > 0: handler = logging_utils.ColorStreamHandler() else: handler = logging.StreamHandler(sys.stdout) # pylint: enable=redefined-variable-type handler.setFormatter(run_tests_helper.CustomFormatter()) logging.getLogger().addHandler(handler) constants.SetBuildType(args.build_type) if args.output_directory: constants.SetOutputDirectory(args.output_directory)