Commit 7cac8077 authored by Roman Alifanov's avatar Roman Alifanov

errordialog: removing duplicate lines

parent dc747b8e
......@@ -34,8 +34,9 @@ class ErrorDialog(Adw.Dialog):
["epm", "print", "info"],
capture_output=True, text=True, check=True).stdout
seen = set()
filtered_error_lines = [
line for line in error.splitlines() if '%' not in line
line for line in error.splitlines() if '%' not in line and not (line in seen or seen.add(line))
]
filtered_error = '\n'.join(filtered_error_lines)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment