added check for all blank option values

This commit is contained in:
tgoff0 2015-05-22 00:54:44 +00:00
parent b82c94efd8
commit f675b0a16d

View file

@ -76,7 +76,7 @@ class ConfigurableManager(object):
try:
# key=value
(key, value) = kv.split('=', 1)
if value is not None and value.is_empty():
if value is not None and not value.strip():
value = None
except ValueError:
# value only
@ -84,6 +84,7 @@ class ConfigurableManager(object):
value = kv
if key not in keys:
raise ValueError, "invalid key: %s" % key
if value is not None:
setattr(target, key, value)
return None