Skip to content

Commit aa0054e

Browse files
committed
No warnings test
1 parent b930842 commit aa0054e

File tree

6 files changed

+6
-4
lines changed

6 files changed

+6
-4
lines changed

cwltool/argparser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ def arg_parser() -> argparse.ArgumentParser:
385385

386386
volumegroup = parser.add_mutually_exclusive_group()
387387
volumegroup.add_argument("--verbose", action="store_true", help="Default logging")
388+
volumegroup.add_argument("--no-warnings", action="store_true", help="Only print errors.")
388389
volumegroup.add_argument("--quiet", action="store_true", help="Only print warnings and errors.")
389390
volumegroup.add_argument("--debug", action="store_true", help="Print even more logging")
390391

cwltool/cwlprov/ro.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
import shutil
77
import tempfile
8-
import traceback
98
import uuid
109
from pathlib import Path, PurePosixPath
1110
from typing import (

cwltool/loghandler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
def configure_logging(
1313
stderr_handler: logging.Handler,
14+
no_warnings: bool,
1415
quiet: bool,
1516
debug: bool,
1617
enable_color: bool,
@@ -21,6 +22,8 @@ def configure_logging(
2122
rdflib_logger = logging.getLogger("rdflib.term")
2223
rdflib_logger.addHandler(stderr_handler)
2324
rdflib_logger.setLevel(logging.ERROR)
25+
if no_warnings:
26+
stderr_handler.setLevel(logging.ERROR)
2427
if quiet:
2528
# Silence STDERR, not an eventual provenance log file
2629
stderr_handler.setLevel(logging.WARN)

cwltool/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import io
99
import logging
1010
import os
11-
import shutil
1211
import signal
1312
import subprocess # nosec
1413
import sys

tests/test_js_sandbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
("v7.7.3\n", True),
2323
]
2424

25-
configure_logging(_logger.handlers[-1], False, True, True, True)
25+
configure_logging(_logger.handlers[-1], False, False, True, True, True)
2626
_logger.setLevel(logging.DEBUG)
2727

2828

tests/test_load_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from .util import get_data
1717

18-
configure_logging(_logger.handlers[-1], False, True, True, True)
18+
configure_logging(_logger.handlers[-1], False, False, True, True, True)
1919
_logger.setLevel(logging.DEBUG)
2020

2121

0 commit comments

Comments
 (0)