small tweaks to the refresh code
This commit is contained in:
parent
e84b181f80
commit
3fde4692d1
5 changed files with 23 additions and 32 deletions
|
@ -39,12 +39,10 @@ class PluginLoader(object):
|
|||
|
||||
self.load_all()
|
||||
|
||||
|
||||
def stop(self):
|
||||
"""shuts down the plugin reloader"""
|
||||
self.observer.stop()
|
||||
|
||||
|
||||
def load_all(self):
|
||||
"""runs load_file() on all python files in the plugins folder"""
|
||||
files = set(glob.glob(os.path.join(self.path, '*.py')))
|
||||
|
@ -52,7 +50,6 @@ class PluginLoader(object):
|
|||
self.load_file(f, rebuild=True)
|
||||
self.rebuild()
|
||||
|
||||
|
||||
def load_file(self, path, rebuild=False):
|
||||
"""loads (or reloads) all valid plugins from a specified file"""
|
||||
filename = os.path.basename(path)
|
||||
|
@ -118,7 +115,6 @@ class PluginLoader(object):
|
|||
|
||||
self.rebuild()
|
||||
|
||||
|
||||
def rebuild(self):
|
||||
"""rebuilds the cloudbot command and event hook lists"""
|
||||
self.bot.commands = {}
|
||||
|
|
Reference in a new issue