Software /
code /
prosody
Diff
util/hashes.lua @ 407:7ae008771391
Fix softreq, so it reports when no suitable MD5 library is found
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 25 Nov 2008 01:56:20 +0000 |
parent | 194:4ea1ec218976 |
line wrap: on
line diff
--- a/util/hashes.lua Tue Nov 25 01:55:01 2008 +0000 +++ b/util/hashes.lua Tue Nov 25 01:56:20 2008 +0000 @@ -1,5 +1,5 @@ -local softreq = function (...) return select(2, pcall(require, ...)); end +local softreq = function (...) local ok, lib = pcall(require, ...); if ok then return lib; else return nil; end end local error = error; module "hashes"