Use better names for TrackerIcons' args
This commit is contained in:
parent
a4c6f4e8c9
commit
58a74202e1
|
@ -121,7 +121,7 @@ class TrackerIcons(Component):
|
||||||
"""
|
"""
|
||||||
A TrackerIcon factory class
|
A TrackerIcon factory class
|
||||||
"""
|
"""
|
||||||
def __init__(self, dir=None, noIcon=None):
|
def __init__(self, icon_dir=None, no_icon=None):
|
||||||
"""
|
"""
|
||||||
Initialises a new TrackerIcons object
|
Initialises a new TrackerIcons object
|
||||||
|
|
||||||
|
@ -132,9 +132,9 @@ class TrackerIcons(Component):
|
||||||
:type noIcon: string
|
:type noIcon: string
|
||||||
"""
|
"""
|
||||||
Component.__init__(self, "TrackerIcons")
|
Component.__init__(self, "TrackerIcons")
|
||||||
if not dir:
|
if not icon_dir:
|
||||||
dir = get_config_dir("icons")
|
icon_dir = get_config_dir("icons")
|
||||||
self.dir = dir
|
self.dir = icon_dir
|
||||||
if not os.path.isdir(self.dir):
|
if not os.path.isdir(self.dir):
|
||||||
os.makedirs(self.dir)
|
os.makedirs(self.dir)
|
||||||
|
|
||||||
|
@ -146,8 +146,8 @@ class TrackerIcons(Component):
|
||||||
self.icons[host] = TrackerIcon(os.path.join(self.dir, icon))
|
self.icons[host] = TrackerIcon(os.path.join(self.dir, icon))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
log.warning("invalid icon %s", icon)
|
log.warning("invalid icon %s", icon)
|
||||||
if noIcon:
|
if no_icon:
|
||||||
self.icons[None] = TrackerIcon(noIcon)
|
self.icons[None] = TrackerIcon(no_icon)
|
||||||
else:
|
else:
|
||||||
self.icons[None] = None
|
self.icons[None] = None
|
||||||
self.icons[''] = self.icons[None]
|
self.icons[''] = self.icons[None]
|
||||||
|
|
Loading…
Reference in New Issue