mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +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(_):
|
def subcommand_get_logs(_):
|
||||||
"""Get latest FreedomBox logs."""
|
"""Get latest FreedomBox logs."""
|
||||||
command = ['journalctl', '--no-pager', '-n', '100', '-u', 'plinth']
|
command = ['journalctl', '--no-pager', '--lines=100', '--unit=plinth']
|
||||||
process = subprocess.run(command, stdout=subprocess.PIPE, check=True)
|
subprocess.run(command, check=True)
|
||||||
data = process.stdout.decode()
|
|
||||||
print(data)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user