File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ def unload(self, path):
5050 path = path .decode ()
5151 self .bot .loop .call_soon_threadsafe (lambda : asyncio .async (self ._unload (path ), loop = self .bot .loop ))
5252
53-
5453 @asyncio .coroutine
5554 def _reload (self , path ):
5655 if path in self .reloading :
@@ -63,7 +62,6 @@ def _reload(self, path):
6362 self .reloading .remove (path )
6463 yield from self .bot .plugin_manager .load_plugin (path )
6564
66-
6765 @asyncio .coroutine
6866 def _unload (self , path ):
6967 yield from self .bot .plugin_manager .unload_plugin (path )
@@ -87,6 +85,7 @@ def on_modified(self, event):
8785 self .loader .reload (event .src_path )
8886
8987 def on_moved (self , event ):
88+ self .loader .unload (event .src_path )
9089 # only load if it's moved to a .py file
9190 if event .dest_path .endswith (".py" if isinstance (event .dest_path , str ) else b".py" ):
9291 self .loader .reload (event .dest_path )
You can’t perform that action at this time.
0 commit comments