Opened 2 years ago
Closed 2 years ago
#487 closed defect (fixed)
refextract: improve argument check
| Reported by: | simko | Owned by: | chayward |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | BibEdit | Version: | |
| Keywords: | Cc: |
Description
When you run refextract on a non-existent file, it tracebacks with:
UnboundLocalError: local variable 'count_auth_group' referenced before assignment
It should check the parameters properly and report the concrete problem, e.g. file non-existent, permission denied, etc.
Change History (6)
comment:1 Changed 2 years ago by simko
- Owner set to chayward
- Status changed from new to assigned
comment:2 Changed 2 years ago by chayward
- Status changed from assigned to in_merge
comment:3 Changed 2 years ago by chayward
comment:4 Changed 2 years ago by simko
- Status changed from in_merge to assigned
Running refextract on a non-existent file does not report an error for
me; it produces empty output:
/opt/invenio/bin/refextract 1:/tmp/nonexistentfile.pdf
<?xml version="1.0" encoding="UTF-8"?>
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record>
<controlfield tag="001">1</controlfield>
<datafield tag="999" ind1="C" ind2="6">
<subfield code="a">Invenio/1.0.0-rc0.40-106ba refextract/1.0.0-rc0.40-106ba-1297762113-1-0-0-0-0-0-0</subfield>
</datafield>
</record>
</collection>
It should print an error message and exit with some error code
so that clients can know something went wrong. (e.g. workflow can
halt etc)
comment:5 Changed 2 years ago by chayward
- Status changed from assigned to in_merge
on branch: refextract-countauth-fix
comment:6 Changed 2 years ago by Christopher Hayward <christopher.james.hayward@…>
- Resolution set to fixed
- Status changed from in_merge to closed
Note: See
TracTickets for help on using
tickets.

on branch: refextract-countauth-fix
paired with support for arxiv file names