Software /
code /
prosody
Changeset
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 |
parents | 406:11f176cae9da |
children | 408:eb1a0960cefb |
files | util/hashes.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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"