diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-12 22:31:32 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-12 22:31:32 +0000 |
commit | 3117e32bad46ee873b07be6be7d06bef54fda33b (patch) | |
tree | 215a369a56f30a33f6be43af822464d237598a54 | |
parent | 481b6b1306c04162d1570ed7fcf8a9a72fd2b956 (diff) |
Added --verbose handling.
-rw-r--r-- | worker/tests/ldap.rb | 7 |
1 files changed, 4 insertions, 3 deletions
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 |