Properly handle empty values in storage
authorSimo Sorce <simo@redhat.com>
Tue, 14 Oct 2014 22:39:19 +0000 (18:39 -0400)
committerPatrick Uiterwijk <puiterwijk@redhat.com>
Fri, 24 Oct 2014 16:03:28 +0000 (18:03 +0200)
Do not return default values if an actual empty string is found
in the database.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
ipsilon/util/plugin.py

index 9222a35..919a28d 100755 (executable)
@@ -154,7 +154,7 @@ class PluginObject(Log):
         value = None
         if self._config:
             value = self._config.get(name, None)
         value = None
         if self._config:
             value = self._config.get(name, None)
-        if not value:
+        if value is None:
             if self._options:
                 opt = self._options.get(name, None)
                 if opt:
             if self._options:
                 opt = self._options.get(name, None)
                 if opt: