From 2aba441a3093a658b4663e599b10b56d085bc6e0 Mon Sep 17 00:00:00 2001 From: "Larry Staton Jr." Date: Sun, 20 Jul 2014 18:11:30 -0400 Subject: [PATCH] Update sftp.rb Fix ArgumentError on exception. Line 55 had 2 arguments, but the `handle_exception` method in line 30 only required 1 argument. --- lib/middleman-deploy/methods/sftp.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/middleman-deploy/methods/sftp.rb b/lib/middleman-deploy/methods/sftp.rb index 1783e4a..1809c77 100644 --- a/lib/middleman-deploy/methods/sftp.rb +++ b/lib/middleman-deploy/methods/sftp.rb @@ -27,7 +27,7 @@ module Middleman protected - def handle_exception(exception) + def handle_exception(exception,filename, file_path) reply = exception.message err_code = reply[0,3].to_i @@ -52,7 +52,7 @@ module Middleman begin sftp.upload(filename, file_path) rescue Exception => exception - handle_exception(exception, file_path) + handle_exception(exception, filename, file_path) end puts "Copied #{filename}"