Add OS and Python Information to error dialog

This commit is contained in:
Andrew Senetar 2021-08-25 02:05:18 -05:00
parent 47dbe805bb
commit efb76c7686
Signed by: arsenetar
GPG Key ID: C63300DCE48AB2F1
1 changed files with 4 additions and 1 deletions

View File

@ -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)