Bug 36935: Remove warning if file parsing is successful
This patch removes the logged warning if a file parse is successful.
Test plan:
1) prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t
2) The output will have a logged message - 'EOF - End of data in parsing input stream'
3) Apply patch
4) Repeat step 1
5) The warning will be gone
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7c0ed91c80)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
d0ac78ee0f
commit
008b7c72bf
|
|
@ -241,14 +241,16 @@ sub read_file {
|
|||
my $headers_to_check = $csv->getline($fh);
|
||||
my $column_headers = rescue_EBSCO_files($headers_to_check);
|
||||
my $lines = $csv->getline_all( $fh, 0 );
|
||||
|
||||
my ( $cde, $str, $pos ) = $csv->error_diag();
|
||||
my $error = $cde ? "$cde, $str, $pos" : "";
|
||||
warn $error if $error;
|
||||
|
||||
close($fh);
|
||||
|
||||
return ( $column_headers, $lines, $error );
|
||||
unless($csv->eof()) {
|
||||
my ( $cde, $str, $pos ) = $csv->error_diag();
|
||||
my $error = $cde ? "$cde, $str, $pos" : "";
|
||||
warn $error if $error;
|
||||
return ( $column_headers, $lines, $error );
|
||||
}
|
||||
|
||||
return ( $column_headers, $lines );
|
||||
}
|
||||
|
||||
=head3 create_title_hash_from_line_data
|
||||
|
|
|
|||
Loading…
Reference in New Issue