#712: BibFormat: fix multiple output format option
------------------------+----------------------
Reporter: simko | Owner: rajimene
Type: defect | Status: assigned
Priority: major | Milestone:
Component: BibFormat | Version:
Resolution: | Keywords:
------------------------+----------------------
Changes (by simko):
* status: in_merge => assigned
Comment:
If you use a wrong output format value, such as:
{{{
$ sudo -u www-data /opt/invenio/bin/bibreformat -u admin -o XY
}}}
the branch allows you to submit such a task; and when you later execute
it, the log and err files are mostly empty:
{{{
$ head /opt/invenio/var/log/bibsched_task_8.{log,err}
==> /opt/invenio/var/log/bibsched_task_8.log <==
2011-08-10 21:00:51 --> Task #8 started.
2011-08-10 21:00:51 --> Task #8 finished. [DONE WITH ERRORS]
==> /opt/invenio/var/log/bibsched_task_8.err <==
}}}
The error is logged only in `/opt/invenio/var/log/invenio.err`:
{{{
$ grep ^'\* ' /opt/invenio/var/log/invenio.err
$ * 2011-08-10 21:00:51 -> Exception: Invalid output format.
(bibreformat.py:389:task_run_core)
}}}
This is not optimal. The error should be either logged in
`bibsched_task_8.err` or, ideally, the system should not even permit to
submit such a task. The output format option should be checked at the
submission time, so that only good tasks would pass through and get
submitted. Can you please amend the branch?
--
Ticket URL: <http://invenio-software.org/ticket/712#comment:3>
Invenio <http://invenio-software.org>