Skip to content

Commit 6bb9822

Browse files
committed
Do not display outdated version warning if quiet
For #111 and #1688 We need to respect the --quiete flags Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 998f18d commit 6bb9822

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/scancode/cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ def scancode(ctx, input, # NOQA
514514

515515
# check for updates
516516
from scancode.outdated import check_scancode_version
517-
outdated=check_scancode_version()
518-
if outdated:
517+
outdated = check_scancode_version()
518+
if not quiet and outdated:
519519
echo_stderr(outdated, fg='yellow')
520520

521521
except click.UsageError as e:
@@ -1185,7 +1185,7 @@ def scan_codebase(codebase, scanners, processes=1, timeout=DEFAULT_TIMEOUT,
11851185
location, rid, scan_errors, scan_time, scan_result, scan_timings = scans.next()
11861186
else:
11871187
location, rid, scan_errors, scan_time, scan_result, scan_timings = next(scans)
1188-
1188+
11891189
if TRACE_DEEP:
11901190
logger_debug(
11911191
'scan_codebase: location:', location, 'results:', scan_result)
@@ -1258,7 +1258,7 @@ def terminate_pool(pool):
12581258

12591259

12601260
def terminate_pool_with_backoff(pool, number_of_trials=3):
1261-
# try a few times to terminate,
1261+
# try a few times to terminate,
12621262
for trial in range(number_of_trials, 1):
12631263
try:
12641264
pool.terminate()

0 commit comments

Comments
 (0)