Use a more correct error message

-1 is a valid session ID, even though it's a fake one.
bug/bundler_fix
William Vu 2014-02-11 18:06:43 -06:00
parent 4a603b9a8d
commit 5a488b310d
1 changed files with 2 additions and 3 deletions

View File

@ -93,19 +93,18 @@ protected
#
def self.job_run_proc(ctx)
mod = ctx[0]
sid = mod.datastore["SESSION"]
begin
mod.setup
mod.framework.events.on_module_run(mod)
# Grab the session object since we need to fire an event for not
# only the normal module_run event that all module types have to
# report, but a specific event for sessions as well.
s = mod.framework.sessions.get(sid)
s = mod.framework.sessions.get(mod.datastore["SESSION"])
if s
mod.framework.events.on_session_module_run(s, mod)
mod.run
else
mod.print_error("Invalid session ID: #{sid}")
mod.print_error("Session not found")
mod.cleanup
return
end