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: try:
# key=value # key=value
(key, value) = kv.split('=', 1) (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 value = None
except ValueError: except ValueError:
# value only # value only
@ -84,7 +84,8 @@ class ConfigurableManager(object):
value = kv value = kv
if key not in keys: if key not in keys:
raise ValueError, "invalid key: %s" % key raise ValueError, "invalid key: %s" % key
setattr(target, key, value) if value is not None:
setattr(target, key, value)
return None return None
def reset(self): def reset(self):