From ce2dedab7ae7bc5eb61ff8f75a9c6e4699f9d676 Mon Sep 17 00:00:00 2001 From: Matthew Connelly Date: Sat, 5 Sep 2015 16:22:29 +0100 Subject: [PATCH] Fixed an oopsie with $ssh->error --- ayudante-lobo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ayudante-lobo b/ayudante-lobo index 83f482d..c0fdba3 100755 --- a/ayudante-lobo +++ b/ayudante-lobo @@ -40,9 +40,9 @@ sub scp_upload { } catch { logger(2,"SSH connection failed (exception): $_") and return 0; }; - logger(2,"SSH connection failed (error): ".$ssh->error) and return 0 if $ssh->error; + logger(2,"SSH connection failed (error): ".$ssh->error()) and return 0 if $ssh->error; $ssh->auth_publickey($Conf->{'upload'}->{user},$Conf->{'upload'}->{sshkeypath}.'.pub',$Conf->{'upload'}->{sshkeypath}); - logger(2,"SSH connection failed (auth error): ".$ssh->error) and return 0 unless $ssh->auth_ok; + logger(2,"SSH connection failed (auth error): ".$ssh->error()) and return 0 unless $ssh->auth_ok; $Conf->{'upload'}->{remotepath} .= "/" unless $Conf->{'upload'}->{remotepath} =~ /\/$/; logger(2,"File upload failed: ".$ssh->error) and return 0 unless $ssh->scp_put("$file",$Conf->{'upload'}->{remotepath}.$file->basename); $ssh->disconnect; return 1;