From 6c993242f27242a5c8311a66d570b992af81a185 Mon Sep 17 00:00:00 2001 From: romjerome Date: Wed, 21 Dec 2016 11:52:19 +0100 Subject: [PATCH] 9824: pylint error: fix theme variable for AttributeError was pull request #284 --- gramps/gui/widgets/labels.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gramps/gui/widgets/labels.py b/gramps/gui/widgets/labels.py index 8890c7fed..4226a964a 100644 --- a/gramps/gui/widgets/labels.py +++ b/gramps/gui/widgets/labels.py @@ -154,7 +154,7 @@ class LinkLabel(Gtk.EventBox): format = 'underline="single" foreground="' + self.color + '" '\ 'weight="heavy"' else: - raise AttributeError("invalid theme: '%s'" % theme) + raise AttributeError("invalid theme: '%s'" % self.theme) elif self.emph is None: # no link, no change on enter_text if self.theme == "CLASSIC": @@ -162,7 +162,7 @@ class LinkLabel(Gtk.EventBox): elif self.theme == "WEBPAGE": format = 'weight="heavy"' else: - raise AttributeError("invalid theme: '%s'" % theme) + raise AttributeError("invalid theme: '%s'" % self.theme) else: #no emphasize, a link if self.theme == "CLASSIC": @@ -170,7 +170,7 @@ class LinkLabel(Gtk.EventBox): elif self.theme == "WEBPAGE": format = 'underline="single" foreground="' + self.color + '"' else: - raise AttributeError("invalid theme: '%s'" % theme) + raise AttributeError("invalid theme: '%s'" % self.theme) text = '%s' % (format, self.orig_text) self.label.set_text(text)