Hello,
I found this:
given an integer as recid to BibRecDocs is ok, but gives an error for a string:
This is ok:
BibRecDocs(29087).list_bibdocs()[0].list_all_files()
but:
BibRecDocs('29087').list_bibdocs()[0].list_all_files()
gives a bad exception:
/rero/.virtualenvs/invenio/lib/python2.6/site-packages/invenio/bibdocfile.pyc
in __repr__(self)
2679
2680 def __repr__(self):
-> 2681 return ('BibDocFile(%s, %s, %i, %s, %s, %i, %i, %s, %s, %s,
%s)' % (repr(self.fullpath), repr(self.doctype), self.version, repr(self.name),
repr(self.format), self.recid, self.docid, repr(self.status),
repr(self.checksum), repr(self.more_info), repr(self.human_readable)))
2682
2683 def __str__(self):
TypeError: %d format: a number is required, not str
Perhaps a good fix is to check the type of the input parameter and generate a
comprehensive exception.
Many thanks,
Regards,
----------------------------------------------------------------------
Johnny Mariéthoz
RERO, Av. de la Gare 45, CH - 1920 MARTIGNY
Téléphone: +41(0)27 721 8579
Fax : +41(0)27 721 8586
Web : http://www.rero.ch
ReroDoc : http://doc.rero.ch, [email protected]
----------------------------------------------------------------------