Пример #1
0
    def handle(self, *args, **options):
        try:
            PLUGINS_PATH = Config.getValue("PLUGINS", "path")
        except:
            raise CommandError("[path] value not defined in section [PLUGINS] . See web.cfg!")

        ''' load games plugins '''
        try:
            load_plugins(PLUGINS_PATH)
        except:
            raise CommandError("Unable to load plugins")
        self.stdout.write("Successfully loaded plugins")
Пример #2
0
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
    }
}

plugin_methods = {}
plugin_methods_map = {}

from engine.util.configparser import Config
from engine.controller.rts import load_plugins
 
try:
    PLUGINS_PATH = Config.getValue("PLUGINS", "path")
except:
    raise Exception("[path] value not defined in section [PLUGINS] . See web.cfg!")

''' load games plugins '''
try:
    PLUGINS = load_plugins(PLUGINS_PATH)
except:
    raise Exception("Unable to load plugins")