]> git.e2factory.org Git - e2factory.git/commitdiff
cache: setup_cache: return false instead of nil
authorTobias Ulmer <tu@emlix.com>
Wed, 7 Sep 2016 15:55:19 +0000 (17:55 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:18 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/cache.lua

index 4d7e5d67b1404aacc93f640879115f31f12958c9..ebdb7bea017769c9017f21779b3b7ac8b80c1f42 100644 (file)
@@ -90,7 +90,7 @@ function cache.setup_cache(config)
     local cache_url = string.format("file://%s", cache_path)
     local c, re = new_cache("local cache", cache_url)
     if not c then
-        return nil, e:cat(re)
+        return false, e:cat(re)
     end
     for name,server in pairs(config.servers) do
         local flags = {}
@@ -101,10 +101,10 @@ function cache.setup_cache(config)
         flags.push_permissions = server.push_permissions
         local rc, re = cache.new_cache_entry(c, name, server.url, flags)
         if not rc then
-            return nil, e:cat(re)
+            return false, e:cat(re)
         end
     end
-    return c, nil
+    return c
 end
 
 --- get a sorted list of servers