File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ def get_notes(xopts)
115
115
116
116
return ret if not host
117
117
notes = [ ]
118
+
118
119
if opts [ :proto ] && opts [ :port ]
119
120
services = [ ]
120
121
nret = host . services . find_by_proto_and_port ( opts [ :proto ] , opts [ :port ] )
@@ -952,8 +953,12 @@ def rpc_report_note(xopts)
952
953
addr = opts [ :host ] || opts [ :address ]
953
954
wspace = opts [ :workspace ] || self . framework . db . workspace
954
955
host = wspace . hosts . find_by_address ( addr )
955
- service = host . services . find_by_proto_and_port ( opts [ :proto ] , opts [ :port ] ) if host . services . count > 0
956
- opts [ :service ] = service if service
956
+ if host && host . services . count > 0
957
+ service = host . services . find_by_proto_and_port ( opts [ :proto ] , opts [ :port ] )
958
+ if service
959
+ opts [ :service ] = service
960
+ end
961
+ end
957
962
end
958
963
959
964
res = self . framework . db . report_note ( opts )
You can’t perform that action at this time.
0 commit comments