summaryrefslogtreecommitdiff
path: root/lib/custodian/protocol-tests/ftp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/protocol-tests/ftp.rb')
-rwxr-xr-xlib/custodian/protocol-tests/ftp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/custodian/protocol-tests/ftp.rb b/lib/custodian/protocol-tests/ftp.rb
index 2d0700a..1ecd68a 100755
--- a/lib/custodian/protocol-tests/ftp.rb
+++ b/lib/custodian/protocol-tests/ftp.rb
@@ -81,11 +81,11 @@ class FTPTest
socket.puts( "QUIT")
banner = socket.gets(nil)
- banner = banner[0,20]
+ banner = banner[0,20] unless( banner.nil? )
socket.close()
- if ( banner =~ /^220/ )
+ if ( ( !banner.nil? ) && ( banner =~ /^220/ ) )
return true
else
@error = "Banner didn't report OK: #{banner}"