This is an automated notification sent by LCG Savannah.
It relates to:
                bugs #62981, project CDS Invenio

==============================================================================
 OVERVIEW of bugs #62981:
==============================================================================

URL:
  <http://savannah.cern.ch/bugs/?62981>

                 Summary: bfe_field.py does not support extension argument
                 Project: CDS Invenio
            Submitted by: tbrooks
            Submitted on: 2010-02-16 17:57
                Category: None
                Severity: 2 - Minor
                Priority: 3 - Low
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________


bfe_field.py advertises an extension argument, which is appended to the list
of field values if the specified limit is exceeded (something like "et al.")

However this does not work.  

In [2]: bfo = invenio.bibformat_engine.BibFormatObject(9701)

In [3]: from invenio.bibformat_elements.bfe_field import format as format

In [4]: format(bfo, "035", "10", extension = " and others ")
Out[4]: 'arXiv oai:arXiv.org:0803.0081 DESY D08-03589 SPIRESTeX
Gubser:2008vz'

In [5]: format(bfo, "035", "2", extension = " and others ")
Out[5]: 'arXiv oai:arXiv.org:0803.0081'

The reason appears to be the last lines:

 if limit.isdigit() and x > int(limit):
        ext_out = extension

Alas, x never gets larger than limit in these cases, because the loop over
instances terminates when x reaches limit.  

Should be a rather easy fix, taking slightly more time than it took me to
submit this...(sorry)



    _______________________________________________________

Carbon-Copy List:

CC Address                          | Comment
------------------------------------+-----------------------------
3364                                | -SUB-




==============================================================================

This item URL is:
  <http://savannah.cern.ch/bugs/?62981>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/

Reply via email to