Remove renamed plugin Mute
This commit is contained in:
parent
c7a8a3933e
commit
e564470490
1 changed files with 9 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import shutil
|
||||||
|
import time
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from Debug import Debug
|
from Debug import Debug
|
||||||
|
@ -18,11 +20,18 @@ class PluginManager:
|
||||||
self.after_load = [] # Execute functions after loaded plugins
|
self.after_load = [] # Execute functions after loaded plugins
|
||||||
|
|
||||||
sys.path.append(self.plugin_path)
|
sys.path.append(self.plugin_path)
|
||||||
|
self.migratePlugins()
|
||||||
|
|
||||||
if config.debug: # Auto reload Plugins on file change
|
if config.debug: # Auto reload Plugins on file change
|
||||||
from Debug import DebugReloader
|
from Debug import DebugReloader
|
||||||
DebugReloader(self.reloadPlugins)
|
DebugReloader(self.reloadPlugins)
|
||||||
|
|
||||||
|
def migratePlugins(self):
|
||||||
|
for dir_name in os.listdir(self.plugin_path):
|
||||||
|
if dir_name == "Mute":
|
||||||
|
self.log.info("Deleting deprecated/renamed plugin: %s" % dir_name)
|
||||||
|
shutil.rmtree("%s/%s" % (self.plugin_path, dir_name))
|
||||||
|
|
||||||
# -- Load / Unload --
|
# -- Load / Unload --
|
||||||
|
|
||||||
# Load all plugin
|
# Load all plugin
|
||||||
|
|
Loading…
Reference in a new issue