@@ -43,14 +43,14 @@ def _shell_quote(self, s: str) -> str:
4343 return "'" + s .replace ("'" , "'\" '\" '" ) + "'"
4444
4545 def _flat_name (self , path : str ) -> str :
46- return "journalctl__" + path .lstrip ("/" ).replace ("/" , "__" ) + ".jsonl "
46+ return "journalctl__" + path .lstrip ("/" ).replace ("/" , "__" ) + ".json "
4747
4848 def _read_with_journalctl (self , path : str ):
4949 qp = self ._shell_quote (path )
5050 cmd = f"journalctl --no-pager --system --all --file={ qp } --output=json"
5151 res = self ._run_sut_cmd (cmd , sudo = True , log_artifact = False , strip = False )
5252
53- if res .exit_code == 0 and res . stdout :
53+ if res .exit_code == 0 :
5454 text = (
5555 res .stdout .decode ("utf-8" , "replace" )
5656 if isinstance (res .stdout , (bytes , bytearray ))
@@ -107,7 +107,7 @@ def _get_journals(self):
107107 def collect_data (self , args = None ) -> tuple [TaskResult , JournalData | None ]:
108108 collected = self ._get_journals ()
109109 if collected :
110- jd = JournalData (journal_logs = collected )
110+ data = JournalData (journal_logs = collected )
111111 self .result .message = self .result .message or "Journal data collected"
112- return self .result , jd
112+ return self .result , data
113113 return self .result , None
0 commit comments