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 os
import sys
import shutil
import time
from collections import defaultdict
from Debug import Debug
@ -18,11 +20,18 @@ class PluginManager:
self.after_load = [] # Execute functions after loaded plugins
sys.path.append(self.plugin_path)
self.migratePlugins()
if config.debug: # Auto reload Plugins on file change
from Debug import DebugReloader
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 all plugin