Changeset

5292:46fbb5f1ef0a

prosodyctl: Load LFS and util.openssl when actually needed (fixes unhelpful warnings if no LuaSec installed)
author Kim Alvefur <zash@zash.se>
date Tue, 08 Jan 2013 13:33:35 +0100
parents 5291:01f7522049fb
children 5293:fe9215155453
files prosodyctl
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Tue Jan 08 13:33:01 2013 +0100
+++ b/prosodyctl	Tue Jan 08 13:33:35 2013 +0100
@@ -639,8 +639,8 @@
 	return 1;
 end
 
-local openssl = require "util.openssl";
-local lfs = require "lfs";
+local openssl;
+local lfs;
 
 local cert_commands = {};
 
@@ -744,6 +744,8 @@
 
 function commands.cert(arg)
 	if #arg >= 1 and arg[1] ~= "--help" then
+		openssl = require "util.openssl";
+		lfs = require "lfs";
 		local subcmd = table.remove(arg, 1);
 		if type(cert_commands[subcmd]) == "function" then
 			if not arg[1] then