Use a more correct error message
-1 is a valid session ID, even though it's a fake one.bug/bundler_fix
parent
4a603b9a8d
commit
5a488b310d
|
@ -93,19 +93,18 @@ protected
|
||||||
#
|
#
|
||||||
def self.job_run_proc(ctx)
|
def self.job_run_proc(ctx)
|
||||||
mod = ctx[0]
|
mod = ctx[0]
|
||||||
sid = mod.datastore["SESSION"]
|
|
||||||
begin
|
begin
|
||||||
mod.setup
|
mod.setup
|
||||||
mod.framework.events.on_module_run(mod)
|
mod.framework.events.on_module_run(mod)
|
||||||
# Grab the session object since we need to fire an event for not
|
# 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
|
# only the normal module_run event that all module types have to
|
||||||
# report, but a specific event for sessions as well.
|
# 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
|
if s
|
||||||
mod.framework.events.on_session_module_run(s, mod)
|
mod.framework.events.on_session_module_run(s, mod)
|
||||||
mod.run
|
mod.run
|
||||||
else
|
else
|
||||||
mod.print_error("Invalid session ID: #{sid}")
|
mod.print_error("Session not found")
|
||||||
mod.cleanup
|
mod.cleanup
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue