Update sftp.rb

Fix ArgumentError on exception. Line 55 had 2 arguments, but the `handle_exception` method in line 30 only required 1 argument.
This commit is contained in:
Larry Staton Jr. 2014-07-20 18:11:30 -04:00
parent 84b3cb0121
commit 2aba441a30

View file

@ -27,7 +27,7 @@ module Middleman
protected protected
def handle_exception(exception) def handle_exception(exception,filename, file_path)
reply = exception.message reply = exception.message
err_code = reply[0,3].to_i err_code = reply[0,3].to_i
@ -52,7 +52,7 @@ module Middleman
begin begin
sftp.upload(filename, file_path) sftp.upload(filename, file_path)
rescue Exception => exception rescue Exception => exception
handle_exception(exception, file_path) handle_exception(exception, filename, file_path)
end end
puts "Copied #{filename}" puts "Copied #{filename}"