@@ -39,6 +39,10 @@ def read_json(filename, default):
|
||||
return r
|
||||
|
||||
|
||||
GIT_REPO_URL = "https://github.com/spesmilo/electrum"
|
||||
GIT_REPO_ISSUES_URL = "https://github.com/spesmilo/electrum/issues"
|
||||
|
||||
|
||||
class AbstractNet:
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -33,6 +33,8 @@ from PyQt5.QtWidgets import (QWidget, QLabel, QPushButton, QTextEdit,
|
||||
from electrum.i18n import _
|
||||
from electrum.base_crash_reporter import BaseCrashReporter
|
||||
from electrum.logging import Logger
|
||||
from electrum import constants
|
||||
|
||||
from .util import MessageBoxMixin, read_QIcon, WaitingDialog
|
||||
|
||||
|
||||
@@ -97,17 +99,22 @@ class Exception_Window(BaseCrashReporter, QWidget, MessageBoxMixin, Logger):
|
||||
|
||||
def send_report(self):
|
||||
def on_success(response):
|
||||
# note: 'response' coming from (remote) crash reporter server.
|
||||
# It contains a URL to the GitHub issue, so we allow rich text.
|
||||
self.show_message(parent=self,
|
||||
title=_("Crash report"),
|
||||
msg=response)
|
||||
msg=response,
|
||||
rich_text=True)
|
||||
self.close()
|
||||
def on_failure(exc_info):
|
||||
e = exc_info[1]
|
||||
self.logger.error('There was a problem with the automatic reporting', exc_info=exc_info)
|
||||
self.show_critical(parent=self,
|
||||
msg=(_('There was a problem with the automatic reporting:') + '\n' +
|
||||
str(e) + '\n' +
|
||||
_("Please report this issue manually.")))
|
||||
msg=(_('There was a problem with the automatic reporting:') + '<br/>' +
|
||||
repr(e)[:120] + '<br/>' +
|
||||
_("Please report this issue manually") +
|
||||
f' <a href="{constants.GIT_REPO_ISSUES_URL}">on GitHub</a>.'),
|
||||
rich_text=True)
|
||||
|
||||
proxy = self.main_window.network.proxy
|
||||
task = lambda: BaseCrashReporter.send_report(self, self.main_window.network.asyncio_loop, proxy)
|
||||
|
||||
@@ -666,7 +666,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
|
||||
def show_report_bug(self):
|
||||
msg = ' '.join([
|
||||
_("Please report any bugs as issues on github:<br/>"),
|
||||
"<a href=\"https://github.com/spesmilo/electrum/issues\">https://github.com/spesmilo/electrum/issues</a><br/><br/>",
|
||||
f'''<a href="{constants.GIT_REPO_ISSUES_URL}">{constants.GIT_REPO_ISSUES_URL}</a><br/><br/>''',
|
||||
_("Before reporting a bug, upgrade to the most recent version of Electrum (latest release or git HEAD), and include the version number in your report."),
|
||||
_("Try to explain not only what the bug is, but how it occurs.")
|
||||
])
|
||||
|
||||
@@ -243,7 +243,8 @@ def configure_logging(config):
|
||||
logging.getLogger('kivy').propagate = False
|
||||
|
||||
from . import ELECTRUM_VERSION
|
||||
_logger.info(f"Electrum version: {ELECTRUM_VERSION} - https://electrum.org - https://github.com/spesmilo/electrum")
|
||||
from .constants import GIT_REPO_URL
|
||||
_logger.info(f"Electrum version: {ELECTRUM_VERSION} - https://electrum.org - {GIT_REPO_URL}")
|
||||
_logger.info(f"Python version: {sys.version}. On platform: {describe_os_version()}")
|
||||
_logger.info(f"Logging to file: {str(_logfile_path)}")
|
||||
_logger.info(f"Log filters: verbosity {repr(verbosity)}, verbosity_shortcuts {repr(verbosity_shortcuts)}")
|
||||
|
||||
Reference in New Issue
Block a user