From cf2d87eaf0b90f9e821eb6d9ee97ad677b2b52a0 Mon Sep 17 00:00:00 2001 From: pettershao-ragilenetworks <81281940+pettershao-ragilenetworks@users.noreply.github.com> Date: Mon, 16 Jan 2023 15:19:49 +0800 Subject: [PATCH 1/2] Update main.py --- show/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/show/main.py b/show/main.py index 2ab6554992..505768e643 100755 --- a/show/main.py +++ b/show/main.py @@ -1352,15 +1352,15 @@ def techsupport(since, global_timeout, cmd_timeout, verbose, allow_process_stop, if global_timeout: cmd += " timeout --kill-after={}s -s SIGTERM --foreground {}m".format(COMMAND_TIMEOUT, global_timeout) - if allow_process_stop: - cmd += " -a" - if silent: cmd += " generate_dump" click.echo("Techsupport is running with silent option. This command might take a long time.") else: cmd += " generate_dump -v" + if allow_process_stop: + cmd += " -a" + if since: cmd += " -s '{}'".format(since) From 89b2095ef1db99bb17b53e63130ead958b1c1e7f Mon Sep 17 00:00:00 2001 From: pettershao-ragilenetworks <81281940+pettershao-ragilenetworks@users.noreply.github.com> Date: Mon, 16 Jan 2023 16:43:55 +0800 Subject: [PATCH 2/2] Update techsupport_test.py --- tests/techsupport_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/techsupport_test.py b/tests/techsupport_test.py index 8effa89887..41664e3589 100644 --- a/tests/techsupport_test.py +++ b/tests/techsupport_test.py @@ -12,7 +12,7 @@ ([], 'generate_dump -v -t 5'), (['--since', '2 days ago'], "generate_dump -v -s '2 days ago' -t 5"), (['-g', '50'], 'timeout --kill-after=300s -s SIGTERM --foreground 50m generate_dump -v -t 5'), - (['--allow-process-stop'], '-a generate_dump -v -t 5'), + (['--allow-process-stop'], 'generate_dump -v -a -t 5'), (['--silent'], 'generate_dump -t 5'), (['--debug-dump', '--redirect-stderr'], 'generate_dump -v -d -t 5 -r'), ]