Skip to content

Commit

Permalink
Check log_files is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeShirnia committed Apr 26, 2024
1 parent 09f00ae commit b415a28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oom_investigate.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ def default_system_log(self):
if len(self.log_files) == 1 and "journald" in self.log_files[0]:
self.journalctl = True
return "journald"
if not self.log_files:
return (
"No log files found on system. You might need to manually specify one."
)
return self.log_files[0]

def search_log_dir(self, log_file):
Expand Down

0 comments on commit b415a28

Please sign in to comment.