Changeset

1987:94ecd3e7be87

modulemanager: Fixed traceback on loading modules on unknown hosts.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 17 Oct 2009 23:50:09 +0500
parents 1986:d4ba9d94eb74
children 1988:a6e7fe0fc3dd
files core/modulemanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/modulemanager.lua	Sat Oct 17 23:48:30 2009 +0500
+++ b/core/modulemanager.lua	Sat Oct 17 23:50:09 2009 +0500
@@ -104,7 +104,6 @@
 	
 	if not modulemap[host] then
 		modulemap[host] = {};
-		hosts[host].modules = modulemap[host];
 	end
 	
 	if modulemap[host][module_name] then
@@ -128,6 +127,7 @@
 	
 	setfenv(mod, pluginenv);
 	if not hosts[host] then hosts[host] = { type = "component", host = host, connected = false, s2sout = {} }; end
+	hosts[host].modules = modulemap[host];
 	
 	local success, ret = pcall(mod);
 	if not success then