Add current git HEAD info to support request

This commit is contained in:
Peter Šurda 2017-01-13 12:29:14 +01:00
parent 5ae676f2ad
commit d0b1cbfe1f
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -1,5 +1,6 @@
import ctypes
from PyQt4 import QtCore, QtGui
from os import path
import ssl
import sys
import time
@ -86,6 +87,15 @@ def createSupportMessage(myapp):
myapp.ui.lineEditTo.setText(SUPPORT_ADDRESS)
version = softwareVersion
githeadfile = path.join(paths.codePath(), '..', '.git', 'ORIG_HEAD')
print "GITHEADFILE %s" % (githeadfile)
if (path.isfile(githeadfile)):
try:
with open(githeadfile, 'rt') as githead:
version += " GIT " + githead.readline().rstrip()
except IOError:
pass
os = sys.platform
if os == "win32":
windowsversion = sys.getwindowsversion()