Bugzilla – Attachment 157978 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.46 KB, created by
Martin Renvoize (ashimema)
on 2023-10-27 10:49:52 UTC
(
hide
)
Description:
Bug 35173: Correctly concat error strings
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-10-27 10:49:52 UTC
Size:
2.46 KB
patch
obsolete
>From d61f423e1c98253cc285b724288af4a03a377d9c 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> >--- > 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.41.0
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