From d1888a3359345acffd8d0845c137eefd88072112 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 3 Feb 2012 00:50:58 +0000 Subject: Remove the last of the gflags shim layer Make FLAGS a ConfigOpts instance and fix up all the places where we expected FlagValues behaviour. Change-Id: I8f96f42e0d8d30ba6b362d29861e717cf0fa9e89 --- nova/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'nova/utils.py') diff --git a/nova/utils.py b/nova/utils.py index 674be4a04..7bbfed1e0 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -57,8 +57,7 @@ ISO_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" PERFECT_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%f" FLAGS = flags.FLAGS - -FLAGS.add_option( +FLAGS.register_opt( cfg.BoolOpt('disable_process_locking', default=False, help='Whether to disable inter-process locks')) @@ -572,7 +571,7 @@ class LazyPluggable(object): def __get_backend(self): if not self.__backend: - backend_name = self.__pivot.value + backend_name = FLAGS[self.__pivot] if backend_name not in self.__backends: raise exception.Error(_('Invalid backend: %s') % backend_name) -- cgit