Fixing API setup with new plugin "config spec" world

It shouldn't reference the config until in the setup_plugin() method,
else there's a race condition.
This commit is contained in:
Christopher Allan Webber 2013-05-08 15:20:27 -05:00
parent f65bf89836
commit 230b5eb2eb

View File

@ -23,11 +23,11 @@ _log = logging.getLogger(__name__)
PLUGIN_DIR = os.path.dirname(__file__)
config = pluginapi.get_config(__name__)
def setup_plugin():
_log.info('Setting up API...')
config = pluginapi.get_config(__name__)
_log.debug('API config: {0}'.format(config))
routes = [