aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-18 14:22:17 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-18 14:22:17 +0500
commit9cab19bb05478782752bf4fa9322c51af53c88dc (patch)
tree47fa5c8aeb8b3d32ec5e85fb0c4f532aacbdff67 /plugins
parent6b4c9dd8c2b31901c81a16e1c5310f619242e187 (diff)
downloadprosody-9cab19bb05478782752bf4fa9322c51af53c88dc.tar.gz
prosody-9cab19bb05478782752bf4fa9322c51af53c88dc.zip
mod_storage: Make DBI a soft dependency, not a hard one.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/storage/mod_storage.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/storage/mod_storage.lua b/plugins/storage/mod_storage.lua
index e22de82c..e9f5f923 100644
--- a/plugins/storage/mod_storage.lua
+++ b/plugins/storage/mod_storage.lua
@@ -5,7 +5,7 @@ local cache = { data = {} };
function cache:get(key) return self.data[key]; end
function cache:set(key, val) self.data[key] = val; return val; end
-local DBI = require "DBI";
+local _,DBI = pcall(require, "DBI");
function get_database(driver, db, ...)
local uri = "dbi:"..driver..":"..db;
return cache:get(uri) or cache:set(uri, (function(...)