Fix "route remove" by guarding against constant NameError/backtrace
git-svn-id: file:///home/svn/framework3/trunk@6330 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
b12a3d993e
commit
b1edecb728
|
@ -690,9 +690,12 @@ class Core
|
|||
# Satisfy case problems
|
||||
args[2] = "Local" if (args[2] =~ /local/i)
|
||||
|
||||
# If the supplied gateway is a global Comm, use it.
|
||||
if (Rex::Socket::Comm.const_defined?(args[2]))
|
||||
gw = Rex::Socket::Comm.const_get(args[2])
|
||||
begin
|
||||
# If the supplied gateway is a global Comm, use it.
|
||||
if (Rex::Socket::Comm.const_defined?(args[2]))
|
||||
gw = Rex::Socket::Comm.const_get(args[2])
|
||||
end
|
||||
rescue NameError
|
||||
end
|
||||
|
||||
# If we still don't have a gateway, check if it's a session.
|
||||
|
|
Loading…
Reference in New Issue