Renamed callback to a more sensible name.
This commit is contained in:
parent
94b449466a
commit
5ecbff32f6
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
class ReloadMixin():
|
class ReloadMixin():
|
||||||
def cache(self, callback, do_save=True):
|
def cache(self, reloader, do_save=True):
|
||||||
cache_dict = {}
|
cache_dict = {}
|
||||||
if do_save:
|
if do_save:
|
||||||
if self.save and callable(self.save):
|
if self.save and callable(self.save):
|
||||||
|
|
@ -12,7 +12,7 @@ class ReloadMixin():
|
||||||
if not callable(value):
|
if not callable(value):
|
||||||
cache_dict[key] = value
|
cache_dict[key] = value
|
||||||
|
|
||||||
callback(cache_dict)
|
reloader(self, cache_dict)
|
||||||
|
|
||||||
def reload(self, cache):
|
def reload(self, cache):
|
||||||
for key, value in cache.iteritems():
|
for key, value in cache.iteritems():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue