diff --git a/eval.py b/eval.py index 589596f89a65e8b2af0c3c420a5c10d581723080..7f700765f8cd38a3f04906742a2bb1e7fdf3968a 100755 --- a/eval.py +++ b/eval.py @@ -875,9 +875,12 @@ if __name__ == '__main__': args = parser.parse_args() - numeric_loglevel = getattr(logging, args.log.upper(), None) - if not isinstance(numeric_loglevel, int): - raise ValueError(f'Invalid log level: {args.log}') + if args.log: + numeric_loglevel = getattr(logging, args.log.upper(), None) + if not isinstance(numeric_loglevel, int): + raise ValueError(f'Invalid log level: {args.log}') + else: + numeric_loglevel = logging.WARNING logging.basicConfig(level=numeric_loglevel) log = logging.getLogger(Path(__file__).name) @@ -976,7 +979,7 @@ if __name__ == '__main__': print("Building the artifact ...") make_cmd = ['make'] - if numeric_loglevel <= logging.DEBUG: + if numeric_loglevel > logging.DEBUG: make_cmd.append('-s') subprocess.run(make_cmd, check=True, cwd=ROOT_DIR)