summaryrefslogtreecommitdiff
path: root/ceilometermiddleware
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2016-11-07 18:36:18 +0100
committerPradeep Kilambi <pkilambi@redhat.com>2016-11-07 14:08:20 -0500
commit87bd49b62e0e68d8be7c4f77d60eac19c14f9592 (patch)
treed2b1e3cf781888f8bcc3433d314d68eda2371deb /ceilometermiddleware
parent163b2060fae1492c04eed52e67ce61c3740c710a (diff)
downloadceilometermiddleware-87bd49b62e0e68d8be7c4f77d60eac19c14f9592.tar.gz
Convert nonblocking_notify value from string to boolean1.0.0
Otherwise just setting it to "False" which is a string and therefore, is True, enables it! Change-Id: Iaa5a25e9c7c1d33d13a244d5afe440cd5f1d9883
Diffstat (limited to 'ceilometermiddleware')
-rw-r--r--ceilometermiddleware/swift.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ceilometermiddleware/swift.py b/ceilometermiddleware/swift.py
index a83e8c3..247fa46 100644
--- a/ceilometermiddleware/swift.py
+++ b/ceilometermiddleware/swift.py
@@ -51,6 +51,7 @@ import logging
from oslo_config import cfg
import oslo_messaging
+from oslo_utils import strutils
from pycadf import event as cadf_event
from pycadf.helper import api
from pycadf import measurement as cadf_measurement
@@ -142,7 +143,8 @@ class Swift(object):
# For backward compatibility we default to False and therefore wait for
# sending to complete. This causes swift proxy to hang if the
# destination is unavailable.
- self.nonblocking_notify = conf.get('nonblocking_notify', False)
+ self.nonblocking_notify = strutils.bool_from_string(
+ conf.get('nonblocking_notify', False))
# Initialize the sending queue and thread, but only once
if self.nonblocking_notify and Swift.event_queue is None: