# HG changeset patch # User Waqas Hussain # Date 1255805409 -18000 # Node ID 94ecd3e7be879142053b5223569e99077d19bf68 # Parent d4ba9d94eb74f54a50775d4c5a57ea49f6372d75 modulemanager: Fixed traceback on loading modules on unknown hosts. diff -r d4ba9d94eb74 -r 94ecd3e7be87 core/modulemanager.lua --- 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