From 297a9717b04f20bb8211463cc82b39e6dd245feb Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 31 Aug 2016 11:45:06 +0100 Subject: storagemanager: Simplify function flow --- core/storagemanager.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/storagemanager.lua b/core/storagemanager.lua index 8d83f677..64ae13e3 100644 --- a/core/storagemanager.lua +++ b/core/storagemanager.lua @@ -153,12 +153,12 @@ function open(host, store, typ) if err == "unsupported-store" then if typ == "map" then -- Use shim on top of keyval store log("debug", "map storage driver unavailable, using shim on top of keyval store."); - return create_map_shim(host, store); + ret, err = create_map_shim(host, store); + else + log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver", + driver_name, store, typ or ""); + ret, err = null_storage_driver, nil; end - log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver", - driver_name, store, typ or ""); - ret = null_storage_driver; - err = nil; end end return ret, err; -- cgit v1.2.3