Skip to content

Commit

Permalink
Lazy debugging, sorry ;-)
Browse files Browse the repository at this point in the history
  • Loading branch information
ingrinder committed Apr 13, 2024
1 parent 641dcd2 commit e860e35
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions archey/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,25 @@ def output(self) -> None:
else:
# Iterate through the entries
for entry in self._entries:
# Append single-line or multi-line content as appropriate
if entry.options.get("one_line", True):
self.append(
entry.name,
", ".join(entry_line[1] for entry_line in entry)
or configuration.get("default_strings").get("not_detected"),
)
else:
for entry_line in entry:
try:
# Append single-line or multi-line content as appropriate
if entry.options.get("one_line", True):
self.append(
entry_line[0],
entry_line[1]
entry.name,
", ".join(entry_line[1] for entry_line in entry)
or configuration.get("default_strings").get("not_detected"),
)
else:
for entry_line in entry:
self.append(
entry_line[0],
entry_line[1]
or configuration.get("default_strings").get("not_detected"),
)
except Exception as e:
print(f"{entry.name} says: 'oh no!' :(")
print(f"The following exception happened: {e}")
print(f"Here's the entry's value: {entry.value}")
self._output_text()

def _output_json(self) -> None:
Expand Down

0 comments on commit e860e35

Please sign in to comment.