From 10e527173b98b7a479df576145e80afb6f3da6fb Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 19 Apr 2013 14:42:32 +0200 Subject: moduleapi: Make module:open_store() open a store named after the calling module by default --- core/moduleapi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/moduleapi.lua b/core/moduleapi.lua index a8e6881e..30360f73 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -338,7 +338,7 @@ function api:load_resource(path, mode) end function api:open_store(name, type) - return storagemanager.open(self.host, name, type); + return storagemanager.open(self.host, name or self.name, type); end return api; -- cgit v1.2.3 From d875ae5d80418ef3db16c6d321747cfe0a20f0ac Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Mon, 22 Apr 2013 11:54:15 -0400 Subject: storagemanager: Fix traceback in logging when store type is nil, and store is unsupported. --- core/storagemanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/storagemanager.lua b/core/storagemanager.lua index 36a671be..1c82af6d 100644 --- a/core/storagemanager.lua +++ b/core/storagemanager.lua @@ -86,7 +86,7 @@ function open(host, store, typ) if not ret then if err == "unsupported-store" then log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver", - driver_name, store, typ); + driver_name, store, typ or ""); ret = null_storage_driver; err = nil; end -- cgit v1.2.3