summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 5e968bd35..9922804c0 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -1050,3 +1050,13 @@ def spawn_n(func, *args, **kwargs):
interfering with the service spawns.
"""
eventlet.spawn_n(func, *args, **kwargs)
+
+
+def is_none_string(val):
+ """
+ Check if a string represents a None value.
+ """
+ if not isinstance(val, basestring):
+ return False
+
+ return val.lower() == 'none'