Remove renamed plugin Mute

This commit is contained in:
shortcutme 2018-06-25 14:29:42 +02:00
parent c7a8a3933e
commit e564470490
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -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