diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-06-18 14:22:17 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-06-18 14:22:17 +0500 |
commit | 9cab19bb05478782752bf4fa9322c51af53c88dc (patch) | |
tree | 47fa5c8aeb8b3d32ec5e85fb0c4f532aacbdff67 /plugins/storage | |
parent | 6b4c9dd8c2b31901c81a16e1c5310f619242e187 (diff) | |
download | prosody-9cab19bb05478782752bf4fa9322c51af53c88dc.tar.gz prosody-9cab19bb05478782752bf4fa9322c51af53c88dc.zip |
mod_storage: Make DBI a soft dependency, not a hard one.
Diffstat (limited to 'plugins/storage')
-rw-r--r-- | plugins/storage/mod_storage.lua | 2 |
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(...) |