Added log files contents to aboutwindow debug info
This commit is contained in:
@@ -143,10 +143,16 @@ class CartridgesApplication(Adw.Application):
|
|||||||
shared.store.add_game(game, {"skip_save": True})
|
shared.store.add_game(game, {"skip_save": True})
|
||||||
|
|
||||||
def on_about_action(self, *_args):
|
def on_about_action(self, *_args):
|
||||||
|
# Get the debug info from the log files
|
||||||
debug_str = ""
|
debug_str = ""
|
||||||
for path in shared.log_files:
|
for path in shared.log_files:
|
||||||
log_file = lzma.open(path, "rt", encoding="utf-8")
|
log_file = (
|
||||||
|
lzma.open(path, "rt", encoding="utf-8")
|
||||||
|
if path.name.endswith(".xz")
|
||||||
|
else open(path, "r", encoding="utf-8")
|
||||||
|
)
|
||||||
debug_str += log_file.read()
|
debug_str += log_file.read()
|
||||||
|
log_file.close()
|
||||||
|
|
||||||
about = Adw.AboutWindow(
|
about = Adw.AboutWindow(
|
||||||
transient_for=self.win,
|
transient_for=self.win,
|
||||||
|
|||||||
Reference in New Issue
Block a user