Skip to content

Commit

Permalink
Merge pull request #3 from wvu-r7/pr/4902
Browse files Browse the repository at this point in the history
Change print_status to print_error
  • Loading branch information
nstarke committed Mar 10, 2015
2 parents 4d12690 + 3c7b061 commit 9a974af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/msf/ui/console/command_dispatcher/db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ def cmd_db_status(*args)
return if not db_check_driver

if framework.db.connection_established?
cdb = ""
cdb = ''
::ActiveRecord::Base.connection_pool.with_connection do |conn|
if conn.respond_to?(:current_database)
cdb = conn.current_database
Expand All @@ -1707,14 +1707,14 @@ def cmd_db_connect_help
def cmd_db_connect(*args)
return if not db_check_driver
if args[0] != '-h' && framework.db.connection_established?
cdb = ""
cdb = ''
::ActiveRecord::Base.connection_pool.with_connection do |conn|
if conn.respond_to?(:current_database)
cdb = conn.current_database
end
end
print_status("#{framework.db.driver} already connected to #{cdb}. " +
"Run db_disconnect first if you wish to connect to a different database.")
print_error("#{framework.db.driver} already connected to #{cdb}")
print_error('Run db_disconnect first if you wish to connect to a different database')
return
end
if (args[0] == "-y")
Expand Down

0 comments on commit 9a974af

Please sign in to comment.