From 489bb44c92e1ff28cee5b36d767e5c00872fda92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 4 Apr 2016 07:24:30 +0200 Subject: [PATCH] Fixing up for 2.0 release --- server/src/uds/__init__.py | 2 -- server/src/uds/plugins/__init__.py | 17 ++--------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/server/src/uds/__init__.py b/server/src/uds/__init__.py index e5202935d..6d00da342 100644 --- a/server/src/uds/__init__.py +++ b/server/src/uds/__init__.py @@ -79,8 +79,6 @@ class UDSAppConfig(AppConfig): from . import plugins # To make sure plugins are loaded on memory from . import REST # To make sure REST initializes all what it needs - plugins.appLoaded() - import uds.xmlrpc # To make actor live diff --git a/server/src/uds/plugins/__init__.py b/server/src/uds/plugins/__init__.py index 800c5e53a..4b55a2e25 100644 --- a/server/src/uds/plugins/__init__.py +++ b/server/src/uds/plugins/__init__.py @@ -33,31 +33,18 @@ import logging logger = logging.getLogger(__name__) -__plugins = [] - def __init__(): ''' This imports all packages that are descendant of this package, and, after that, it register all subclases of service provider as ''' - global __plugins import os.path, pkgutil import sys - logger.debug('Importing plugins') - + logger.debug('Initializing plugins') # Dinamycally import children of this package. The __init__.py files must import classes pkgpath = os.path.dirname(sys.modules[__name__].__file__) for _, name, _ in pkgutil.iter_modules([pkgpath]): - __plugins.append(__import__(name, globals(), locals(), [], -1)) + __import__(name, globals(), locals(), [], -1) __init__() - -def appLoaded(): - global __plugins - for m in __plugins: - try: - m.appLoaded() - except Exception: - pass -