Bugzilla – Attachment 157980 Details for
Bug 35173
Call concat correctly for EDI SFTP Transport errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35173: Correctly concat error strings
Bug-35173-Correctly-concat-error-strings.patch (text/plain), 2.52 KB, created by
Kyle M Hall (khall)
on 2023-10-27 12:04:24 UTC
(
hide
)
Description:
Bug 35173: Correctly concat error strings
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-10-27 12:04:24 UTC
Size:
2.52 KB
patch
obsolete
>From 0d7b80cf89dabdc8f62f658c817e21c2f6372fa9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 27 Oct 2023 11:48:07 +0100 >Subject: [PATCH] Bug 35173: Correctly concat error strings > >This patch moves the call to $sftp->error outside of the double quote >string and into a . concat to properly expose the error message as >apposed to outputting 'Net::SFTP::Foreign=HASH(0x559c9118f0c8)->error' > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Edifact/Transport.pm | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/Koha/Edifact/Transport.pm b/Koha/Edifact/Transport.pm >index b423eebc374..c0ae452ef98 100644 >--- a/Koha/Edifact/Transport.pm >+++ b/Koha/Edifact/Transport.pm >@@ -148,10 +148,10 @@ sub sftp_download { > } > $sftp->setcwd( $self->{account}->download_directory ) > or return $self->_abort_download( $sftp, >- "Cannot change remote dir : $sftp->error" ); >+ "Cannot change remote dir: " . $sftp->error ); > my $file_list = $sftp->ls() > or return $self->_abort_download( $sftp, >- "cannot get file list from server: $sftp->error" ); >+ "cannot get file list from server: " . $sftp->error ); > foreach my $file ( @{$file_list} ) { > my $filename = $file->{filename}; > >@@ -159,7 +159,7 @@ sub sftp_download { > $sftp->get( $filename, "$self->{working_dir}/$filename" ); > if ( $sftp->error ) { > $self->_abort_download( $sftp, >- "Error retrieving $filename: $sftp->error" ); >+ "Error retrieving $filename: " . $sftp->error ); > last; > } > push @downloaded_files, $filename; >@@ -170,7 +170,7 @@ sub sftp_download { > my $ret = $sftp->rename( $filename, $processed_name ); > if ( !$ret ) { > $self->_abort_download( $sftp, >- "Error renaming $filename: $sftp->error" ); >+ "Error renaming $filename: " . $sftp->error ); > last; > } > >@@ -302,7 +302,7 @@ sub sftp_upload { > $sftp->die_on_error("Cannot ssh to $self->{account}->host"); > $sftp->setcwd( $self->{account}->upload_directory ) > or return $self->_abort_download( $sftp, >- "Cannot change remote dir : $sftp->error" ); >+ "Cannot change remote dir : " . $sftp->error ); > foreach my $m (@messages) { > my $content = $m->raw_msg; > if ($content) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35173
:
157978
| 157980