diff --git a/gramps/gui/aboutdialog.py b/gramps/gui/aboutdialog.py index ea924dd6d..76f66a62a 100644 --- a/gramps/gui/aboutdialog.py +++ b/gramps/gui/aboutdialog.py @@ -27,6 +27,7 @@ #------------------------------------------------------------------------- import os import sys +import platform ##import logging ##_LOG = logging.getLogger(".GrampsAboutDialog") @@ -125,12 +126,9 @@ class GrampsAboutDialog(Gtk.AboutDialog): """ Obtain version information of core dependencies """ + distro = "" # print nothing if there's nothing to print if hasattr(os, "uname"): - operatingsystem = os.uname()[0] distro = "\n" + _("Distribution: %s") % ellipses(os.uname()[2]) - else: # probably Windows - operatingsystem = sys.platform - distro = "" # print nothing if there's nothing to print sqlite = '' if __debug__: @@ -149,7 +147,7 @@ class GrampsAboutDialog(Gtk.AboutDialog): ellipses(str(sys.version).replace('\n','')), BSDDB_STR, ellipses(get_env_var('LANG','')), - ellipses(operatingsystem))) + ellipses(platform.system()))) #------------------------------------------------------------------------- # diff --git a/gramps/gui/logger/_errorreportassistant.py b/gramps/gui/logger/_errorreportassistant.py index cefb541cd..ded48f076 100644 --- a/gramps/gui/logger/_errorreportassistant.py +++ b/gramps/gui/logger/_errorreportassistant.py @@ -28,8 +28,10 @@ from gi.repository import Gdk from gi.repository import Gtk from gi.repository import GdkPixbuf from gi.repository import GObject + import cairo import sys, os +import platform try: import bsddb3 as bsddb # ok, in try/except @@ -167,12 +169,9 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant): """ Get relevant system information. """ + distribution = "" # print nothing if there's nothing to print if hasattr(os, "uname"): - operatingsystem = os.uname()[0] distribution = "Distribution: %s\n" % os.uname()[2] - else: # probably Windows - operatingsystem = sys.platform - distribution = "" # print nothing if there's nothing to print sqlite = '' if __debug__: @@ -194,7 +193,7 @@ class ErrorReportAssistant(ManagedWindow, Gtk.Assistant): BSDDB_STR, sqlite, get_env_var('LANG',''), - operatingsystem, + platform.system(), distribution, '%d.%d.%d' % (Gtk.get_major_version(), Gtk.get_minor_version(),