From efb76c7686bb85cef652a83bd5d451e23cddfd5f Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Wed, 25 Aug 2021 02:05:18 -0500 Subject: [PATCH] Add OS and Python Information to error dialog --- qtlib/error_report_dialog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qtlib/error_report_dialog.py b/qtlib/error_report_dialog.py index 16207389..927a65b7 100644 --- a/qtlib/error_report_dialog.py +++ b/qtlib/error_report_dialog.py @@ -9,6 +9,7 @@ import traceback import sys import os +import platform from PyQt5.QtCore import Qt, QCoreApplication, QSize from PyQt5.QtWidgets import ( @@ -34,7 +35,9 @@ class ErrorReportDialog(QDialog): self._setupUi() name = QCoreApplication.applicationName() version = QCoreApplication.applicationVersion() - error_text = "Application Name: {}\nVersion: {}\n\n{}".format(name, version, error) + error_text = "Application Name: {}\nVersion: {}\nPython: {}\nOperating System: {}\n\n{}".format( + name, version, platform.python_version(), platform.platform(), error + ) # Under windows, we end up with an error report without linesep if we don't mangle it error_text = error_text.replace("\n", os.linesep) self.errorTextEdit.setPlainText(error_text)