Skip to content

Commit 5397fdb

Browse files
committed
Land rapid7#3173, Fix ActiveRecord::ConnectionNotEstablished
2 parents a83401f + 5a448d9 commit 5397fdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/auxiliary/nmap.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def nmap_hosts(&block)
241241
fh = self.nmap_log[0]
242242
nmap_data = fh.read(fh.stat.size)
243243
# fh.unlink
244-
if Rex::Parser.nokogiri_loaded
244+
if Rex::Parser.nokogiri_loaded && framework.db.active
245245
wspace = framework.db.find_workspace(datastore['WORKSPACE'])
246246
wspace ||= framework.db.workspace
247247
import_args = { :data => nmap_data, :wspace => wspace }

0 commit comments

Comments
 (0)