mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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 <sunil@medhas.org>
This commit is contained in:
parent
b8737ad663
commit
f6d3af15ec
@ -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():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user