Don't fail if glance_store is not available

The autohelp glance hook can only work starting with Juno. So ignore
import errors for other versions.

Change-Id: I40570db1cc83ba651e1eb2ba47560a6dc757e326
This commit is contained in:
Gauvain Pocentek 2014-09-28 20:46:49 +02:00
parent efc4e36190
commit d313c1ad51

View File

@ -25,10 +25,14 @@ def keystone_config():
def glance_store_config():
try:
import glance_store
from oslo.config import cfg
glance_store.backend.register_opts(cfg.CONF)
except ImportError:
# glance_store is not available before Juno
pass
HOOKS = {'keystone.common.config': keystone_config,