def get_storage_plugin(config):
 storage_name = getattr(config, 'STORAGE', 'Shelf')
 extra_storage_plugins_dir = getattr(config, 'BOT_EXTRA_STORAGE_PLUGINS_DIR', None)
 spm = SpecificPluginManager(config, 'storage', StoragePluginBase, CORE_STORAGE, extra_storage_plugins_dir)
 storage_pluginfo = spm.get_candidate(storage_name)
 log.info(("Found Storage plugin: '%s'\nDescription: %s" % (storage_pluginfo.name, storage_pluginfo.description)))
 storage_plugin = spm.get_plugin_by_name(storage_name)
 return storage_plugin

def get_storage_plugin ( config ) : storage_name = getattr ( config , 'STORAGE' , 'Shelf' ) extra_storage_plugins_dir = getattr ( config , 'BOT_EXTRA_STORAGE_PLUGINS_DIR' , None ) spm = SpecificPluginManager ( config , 'storage' , StoragePluginBase , CORE_STORAGE , extra_storage_plugins_dir ) storage_pluginfo = spm . get_candidate ( storage_name ) log . info ( ( "Found Storage plugin: '%s'\nDescription: %s" % ( storage_pluginfo . name , storage_pluginfo . description ) ) ) storage_plugin = spm . get_plugin_by_name ( storage_name ) return storage_plugin
find and load the storage plugin .