diff --git a/lib/ssconf.py b/lib/ssconf.py
index f369c60df40e91ca63eb1978fa4ff0b4058e5777..c36aa65c919cac5285f3975939b10965a0234a9c 100644
--- a/lib/ssconf.py
+++ b/lib/ssconf.py
@@ -185,7 +185,7 @@ class SimpleStore(object):
     ssconf_lock.Exclusive(blocking=True, timeout=SSCONF_LOCK_TIMEOUT)
     try:
       for name, value in values.iteritems():
-        if not value.endswith("\n"):
+        if value and not value.endswith("\n"):
           value += "\n"
         utils.WriteFile(self.KeyToFilename(name), data=value)
     finally: