plugins/vcard_update.lua

changeset 392
cdea6a28369e
parent 380
0891b4e27766
child 395
e86144a4eaa1
--- a/plugins/vcard_update.lua	Tue Aug 25 16:27:38 2015 +0200
+++ b/plugins/vcard_update.lua	Tue Aug 25 18:03:10 2015 +0200
@@ -2,15 +2,7 @@
 
 local xmlns_vcard, xmlns_vcard_update = "vcard-temp", "vcard-temp:x:update";
 
--- MMMmmmm.. hacky
-local ok, fun = pcall(function() return require("util.hashes").sha1; end);
-if not ok then
-	ok, fun = pcall(function() return require("util.sha1").sha1; end);
-	if not ok then
-		error("Could not find a sha1()")
-	end
-end
-local sha1 = fun;
+local sha1 = require("util.hashes").sha1;
 
 local ok, fun = pcall(function()
 	local unb64 = require("util.encodings").base64.decode;

mercurial