summaryrefslogtreecommitdiff
path: root/portato/gui/exception_handling.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-03-28 15:01:29 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-03-28 15:01:29 +0100
commit44965f41dfaddc9d7d7eab86498fc25b65793db2 (patch)
treeaea137c2934bef679d610e65503354dc15108a18 /portato/gui/exception_handling.py
parent418690070652c20a10681f9a61a958cd2a0920f6 (diff)
downloadportato-44965f41dfaddc9d7d7eab86498fc25b65793db2.tar.gz
portato-44965f41dfaddc9d7d7eab86498fc25b65793db2.tar.bz2
portato-44965f41dfaddc9d7d7eab86498fc25b65793db2.zip
Added version infos to exceptions
Diffstat (limited to 'portato/gui/exception_handling.py')
-rw-r--r--portato/gui/exception_handling.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/portato/gui/exception_handling.py b/portato/gui/exception_handling.py
index db0cab9..33e58ab 100644
--- a/portato/gui/exception_handling.py
+++ b/portato/gui/exception_handling.py
@@ -101,12 +101,29 @@ class UncaughtExceptionDialog(gtk.MessageDialog):
break
self.destroy()
+def convert (version):
+ """Converts a version given as int-tuple to a normal version string."""
+ return ".".join(map(str, version))
+
+def get_version_infos():
+ from ..constants import VERSION
+ from ..backend import system
+ from lxml import etree
+
+ return "\n".join((
+ "Portato version: %s" % VERSION,
+ "Used backend: %s" % system.get_version(),
+ "pygtk: %s (using GTK+: %s)" % (convert(gtk.pygtk_version), convert(gtk.gtk_version)),
+ "pygobject: %s (using GLib: %s)" % (convert(gobject.pygobject_version), convert(gobject.glib_version)),
+ "lxml: %s" % convert(etree.LXML_VERSION),
+ ""))
+
def get_trace(type, value, tb):
trace = StringIO()
traceback.print_exception(type, value, tb, None, trace)
traceStr = trace.getvalue()
trace.close()
- return traceStr
+ return traceStr + "\n" + get_version_infos()
def register_ex_handler():