9824: pylint error: fix theme variable for AttributeError
was pull request #284
This commit is contained in:
parent
a0b2cf1803
commit
6c993242f2
@ -154,7 +154,7 @@ class LinkLabel(Gtk.EventBox):
|
|||||||
format = 'underline="single" foreground="' + self.color + '" '\
|
format = 'underline="single" foreground="' + self.color + '" '\
|
||||||
'weight="heavy"'
|
'weight="heavy"'
|
||||||
else:
|
else:
|
||||||
raise AttributeError("invalid theme: '%s'" % theme)
|
raise AttributeError("invalid theme: '%s'" % self.theme)
|
||||||
elif self.emph is None:
|
elif self.emph is None:
|
||||||
# no link, no change on enter_text
|
# no link, no change on enter_text
|
||||||
if self.theme == "CLASSIC":
|
if self.theme == "CLASSIC":
|
||||||
@ -162,7 +162,7 @@ class LinkLabel(Gtk.EventBox):
|
|||||||
elif self.theme == "WEBPAGE":
|
elif self.theme == "WEBPAGE":
|
||||||
format = 'weight="heavy"'
|
format = 'weight="heavy"'
|
||||||
else:
|
else:
|
||||||
raise AttributeError("invalid theme: '%s'" % theme)
|
raise AttributeError("invalid theme: '%s'" % self.theme)
|
||||||
else:
|
else:
|
||||||
#no emphasize, a link
|
#no emphasize, a link
|
||||||
if self.theme == "CLASSIC":
|
if self.theme == "CLASSIC":
|
||||||
@ -170,7 +170,7 @@ class LinkLabel(Gtk.EventBox):
|
|||||||
elif self.theme == "WEBPAGE":
|
elif self.theme == "WEBPAGE":
|
||||||
format = 'underline="single" foreground="' + self.color + '"'
|
format = 'underline="single" foreground="' + self.color + '"'
|
||||||
else:
|
else:
|
||||||
raise AttributeError("invalid theme: '%s'" % theme)
|
raise AttributeError("invalid theme: '%s'" % self.theme)
|
||||||
|
|
||||||
text = '<span %s>%s</span>' % (format, self.orig_text)
|
text = '<span %s>%s</span>' % (format, self.orig_text)
|
||||||
self.label.set_text(text)
|
self.label.set_text(text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user