From f6d3af15ec7ce01ee0fc3bf059e19f4bc50082ad Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 28 Jan 2019 10:13:54 -0800 Subject: [PATCH] help: Minor refactoring in get-logs action - Make command line arguments more readable. - Don't collect and reprint the logs. Let them be printed directly. Signed-off-by: Sunil Mohan Adapa --- actions/help | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/actions/help b/actions/help index b4ff0556f..9f9fc8c82 100755 --- a/actions/help +++ b/actions/help @@ -36,10 +36,8 @@ def parse_arguments(): def subcommand_get_logs(_): """Get latest FreedomBox logs.""" - command = ['journalctl', '--no-pager', '-n', '100', '-u', 'plinth'] - process = subprocess.run(command, stdout=subprocess.PIPE, check=True) - data = process.stdout.decode() - print(data) + command = ['journalctl', '--no-pager', '--lines=100', '--unit=plinth'] + subprocess.run(command, check=True) def main():