Clear Powerline.configs when loading main configuration

It should eventually clear out stale watches.
This commit is contained in:
ZyX 2013-03-25 18:41:38 +04:00
parent 7646c949e2
commit fc6636cf57
1 changed files with 7 additions and 0 deletions

View File

@ -292,6 +292,13 @@ class Powerline(object):
:return: dictionary with :ref:`top-level configuration <config-main>`.
'''
with self.configs_lock:
self.configs.clear()
# Watches for unused files will be cleared automatically after some
# time, no need to do this here, especially considering that
# a) most of them are used and thus will be recreated in other
# load_* calls;
# b) it is hard to tell which ones stopped being useful.
return self._load_config('config', 'main_config')
def load_colorscheme_config(self, name):