Check for expected cfg impl (bug 1043479)

Change-Id: Id2ac85d4ac61713c0ca8e2c10e68cbdeeadff4cb
This commit is contained in:
Dolph Mathews 2012-08-29 13:55:40 -05:00
parent 035a956f20
commit 2759c22398

View File

@ -120,7 +120,7 @@ except ImportError:
cfg = __import__('%s.openstack.common.cfg' % app,
fromlist=['%s.openstack.common' % app])
# test which application middleware is running in
if 'config_file' in cfg.CONF:
if hasattr(cfg, 'CONF') and 'config_file' in cfg.CONF:
CONF = cfg.CONF
break
except ImportError: