diff --git a/gui/qt/exception_window.py b/gui/qt/exception_window.py
index 900663f4..1713af3c 100644
--- 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 = """
Traceback
@@ -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: