summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/db/__init__.py5
-rw-r--r--portato/gui/exception_handling.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/portato/db/__init__.py b/portato/db/__init__.py
index 60cb1c9..190fa8a 100644
--- a/portato/db/__init__.py
+++ b/portato/db/__init__.py
@@ -19,6 +19,7 @@ class UnknownDatabaseTypeError (Exception):
pass
_SESSION = None
+_TYPE = None
types = {
"sql": (_("SQLite"), _("Uses an SQLite-database to store package information.\nMay take longer to generate at the first time, but has advantages if portato is re-started with an unchanged portage tree. Additionally it allows to use fast SQL expressions for fetching the data.")),
@@ -27,12 +28,14 @@ types = {
}
def Database(type):
- global _SESSION
+ global _SESSION, _TYPE
if _SESSION is None:
_SESSION = Session("db.cfg", name = "DB")
_SESSION.load()
+ _TYPE = type
+
if type == "sql":
debug("Using SQLDatabase")
try:
diff --git a/portato/gui/exception_handling.py b/portato/gui/exception_handling.py
index 3928680..c973e6b 100644
--- a/portato/gui/exception_handling.py
+++ b/portato/gui/exception_handling.py
@@ -99,12 +99,14 @@ def convert (version):
def get_version_infos():
from ..constants import VERSION
from ..backend import system
+ from ..db import _TYPE as db_type
return "\n".join((
"Portato version: %s" % VERSION,
"System: %s" % " ".join(get_runsystem()),
"Python version: %s" % sys.version,
"Used backend: %s" % system.get_version(),
+ "Used database type: %s" % db_type,
"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))))