#110: BibConvert: improve template checking and error reporting
-------------------------+--------------------------------------------------
 Reporter:  jcaffaro     |       Owner:         
     Type:  enhancement  |      Status:  new    
 Priority:  minor        |   Milestone:         
Component:  BibConvert   |     Version:  v0.99.1
 Keywords:               |  
-------------------------+--------------------------------------------------
 BibConvert fails miserably when templates cannot be parsed. For eg. a
 missing '-' separator in a source template rule will crash BibConvert:

 {{{
 [...]
 ===   data source configuration template   ===
 773cb--<:773c>
 [...]
 }}}

 leads to:

 {{{
 Traceback (most recent call last):
   File "/opt/cds-invenio/bin/bibconvert", line 306, in ?
     bibconvert.convert(ar_)
   File "/usr/lib64/python2.4/site-packages/invenio/bibconvert.py", line
 2072, in convert
     record = create_record(begin_record_header, ending_record_footer,
 query_string, match_mode, Xcount)
   File "/usr/lib64/python2.4/site-packages/invenio/bibconvert.py", line
 1941, in create_record
     DATA = get_subfields(DATA, subfield, SRC_TPL)
   File "/usr/lib64/python2.4/site-packages/invenio/bibconvert.py", line
 221, in get_subfields
     data_item_split = data_item.split(sep, 1)
 ValueError: empty separator
 }}}

 Template checking should be improved, and meaningful warnings should be
 produced

-- 
Ticket URL: <http://cdswaredev.cern.ch/invenio/ticket/110>
Invenio <http://invenio-software.org>

Reply via email to