Consolidate dbfilename

This commit is contained in:
spline 2013-01-15 14:23:59 -05:00
parent bd0249965b
commit 43184dab58

View File

@ -68,7 +68,7 @@ class Weather(callbacks.Plugin):
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(Weather, self) self.__parent = super(Weather, self)
self.__parent.__init__(irc) self.__parent.__init__(irc)
self.db = WeatherDB(dbfilename) self.db = WeatherDB(conf.supybot.directories.data.dirize("Weather.db"))
self.APIKEY = self.registryValue('apiKey') self.APIKEY = self.registryValue('apiKey')
world.flushers.append(self.db.flush) world.flushers.append(self.db.flush)
@ -584,8 +584,6 @@ class Weather(callbacks.Plugin):
'dewpoint':'', 'dewpoint':'',
'metric':''}), optional('text')]) 'metric':''}), optional('text')])
dbfilename = conf.supybot.directories.data.dirize("Weather.db")
Class = Weather Class = Weather
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=250: # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=250: