From 3117e32bad46ee873b07be6be7d06bef54fda33b Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 12 Nov 2012 22:31:32 +0000 Subject: Added --verbose handling. --- worker/tests/ldap.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'worker') diff --git a/worker/tests/ldap.rb b/worker/tests/ldap.rb index 4570f66..35151ba 100644 --- a/worker/tests/ldap.rb +++ b/worker/tests/ldap.rb @@ -18,7 +18,7 @@ def ldap_test ( params ) host = params['target_host'] port = params['test_port'] - puts "LDAP testing host #{host}:#{port}" + puts "LDAP testing host #{host}:#{port}" if ( params['verbose'] ) begin @@ -29,13 +29,14 @@ def ldap_test ( params ) socket.close() return true rescue - puts "LDAP exception on host #{host}:#{port} - #{$!}" + puts "LDAP exception on host #{host}:#{port} - #{$!}" if ( params['verbose'] ) return false end end rescue Timeout::Error => e - puts "TIMEOUT: #{e}" + puts "TIMEOUT: #{e}" if ( params['verbose'] ) return false end + puts "Misc failure" if ( params['verbose'] ) return false end -- cgit v1.2.1