Fixes #1791. Apply patch from jduck to fix bad returns from within proc
git-svn-id: file:///home/svn/framework3/trunk@9208 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
74e64c12fd
commit
b10d68f3f9
|
@ -466,8 +466,8 @@ class DBManager
|
||||||
host.save!
|
host.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
ntype = opts.delete(:type) || opts.delete(:ntype) || return
|
ntype = opts.delete(:type) || opts.delete(:ntype) || raise RuntimeError, "A note :type or :ntype is required"
|
||||||
data = opts[:data] || return
|
data = opts[:data] || raise RuntimeError, "Note :data is required"
|
||||||
method = nil
|
method = nil
|
||||||
args = []
|
args = []
|
||||||
note = nil
|
note = nil
|
||||||
|
@ -830,7 +830,7 @@ class DBManager
|
||||||
host = get_host(:workspace => wspace, :host => addr)
|
host = get_host(:workspace => wspace, :host => addr)
|
||||||
end
|
end
|
||||||
|
|
||||||
ltype = opts.delete(:type) || opts.delete(:ltype) || return
|
ltype = opts.delete(:type) || opts.delete(:ltype) || raise RuntimeError, "A loot :type or :ltype is required"
|
||||||
ctype = opts.delete(:ctype) || opts.delete(:content_type) || 'text/plain'
|
ctype = opts.delete(:ctype) || opts.delete(:content_type) || 'text/plain'
|
||||||
name = opts.delete(:name)
|
name = opts.delete(:name)
|
||||||
info = opts.delete(:info)
|
info = opts.delete(:info)
|
||||||
|
@ -1608,7 +1608,7 @@ class DBManager
|
||||||
addr = h["addrs"]["ipv6"]
|
addr = h["addrs"]["ipv6"]
|
||||||
else
|
else
|
||||||
# Can't report it if it doesn't have an IP
|
# Can't report it if it doesn't have an IP
|
||||||
return
|
raise RuntimeError, "At least one IPv4 or IPv6 address is required"
|
||||||
end
|
end
|
||||||
data[:host] = addr
|
data[:host] = addr
|
||||||
if (h["addrs"].has_key?("mac"))
|
if (h["addrs"].has_key?("mac"))
|
||||||
|
|
Loading…
Reference in New Issue