Merge pull request #1118 from rapid7/bugs/rm7553-uncached-modules-search

Bugs/rm7553 uncached modules search
unstable 4.5.0-RC5
Brandon Turner 2012-12-01 13:59:16 -08:00
commit 1ce1cdf7a0
1 changed files with 5 additions and 2 deletions

View File

@ -1335,10 +1335,13 @@ class Core
}
if framework.db and framework.db.migrated and framework.db.modules_cached
return search_modules_sql(match)
sql_results = search_modules_sql(match)
return sql_results if sql_results # Patches around #7553
else
print_warning("Database not connected or cache not built.")
end
print_error("Warning: database not connected or cache not built, falling back to slow search")
print_warning("Falling back to slow search.")
tbl = generate_module_table("Matching Modules")
[