Bug 37709 - bulkmarcimport.pl should die when the file cannot be opened
Summary: bulkmarcimport.pl should die when the file cannot be opened
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-22 11:35 UTC by Nick Clemens (kidclamp)
Modified: 2024-08-22 12:56 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 37709: Die and notify if file cannot be opened (1.53 KB, patch)
2024-08-22 11:37 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 37709: Die and notify if file cannot be opened (1.58 KB, patch)
2024-08-22 12:56 UTC, Roman Dolny
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2024-08-22 11:35:31 UTC
To recreate:
1 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
2 - Output:
Characteristic MARC flavour: MARC21

0 MARC records done in 0.00804400444030762 seconds
Comment 1 Nick Clemens (kidclamp) 2024-08-22 11:37:26 UTC
Created attachment 170602 [details] [review]
Bug 37709: Die and notify if file cannot be opened

1 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
2 - Output:
    Characteristic MARC flavour: MARC21

    0 MARC records done in 0.00804400444030762 seconds
3 - Apply patch
4 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
5 - Output:
    Characteristic MARC flavour: MARC21
    Could not open notafile.mrc: No such file or directory at misc/migration_tools/bulkmarcimport.pl line 262.
Comment 2 Roman Dolny 2024-08-22 12:56:05 UTC
Created attachment 170608 [details] [review]
Bug 37709: Die and notify if file cannot be opened

1 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
2 - Output:
    Characteristic MARC flavour: MARC21

    0 MARC records done in 0.00804400444030762 seconds
3 - Apply patch
4 - perl misc/migration_tools/bulkmarcimport.pl -b --file=notafile.mrc -v
5 - Output:
    Characteristic MARC flavour: MARC21
    Could not open notafile.mrc: No such file or directory at misc/migration_tools/bulkmarcimport.pl line 262.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>