electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 5893af5025a66121f95f9492f70c16cdf00b565b
parent 22daffbbea52bf8424d970d71c60afcc730b8c63
Author: Johann Bauer <bauerj@bauerj.eu>
Date:   Mon, 26 Feb 2018 19:53:16 +0100

Try to use git hash in crash reports

Diffstat:
Mgui/qt/exception_window.py | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gui/qt/exception_window.py b/gui/qt/exception_window.py @@ -25,6 +25,9 @@ import json import locale import platform import traceback +import os +import sys +import subprocess import requests from PyQt5.QtCore import QObject @@ -33,7 +36,6 @@ from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import * from electrum.i18n import _ -import sys from electrum import ELECTRUM_VERSION, bitcoin issue_template = """<h2>Traceback</h2> @@ -165,6 +167,11 @@ class Exception_Window(QWidget): except: # Maybe the wallet isn't loaded yet pass + try: + args["app_version"] = self.get_git_version() + except: + # This is probably not running from source + pass return args def get_report_string(self): @@ -172,6 +179,11 @@ class Exception_Window(QWidget): info["traceback"] = "".join(traceback.format_exception(*self.exc_args)) return issue_template.format(**info) + @staticmethod + def get_git_version(): + dir = os.path.dirname(os.path.realpath(sys.argv[0])) + return subprocess.check_output(['git', 'describe', '--always'], cwd=dir) + def _show_window(*args): if not Exception_Window._active_window: