Error when parsing possible invalid marc indicators

Bug #400881 reported by Ben Liles
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pymarc
New
Undecided
Unassigned

Bug Description

I'm occasionally getting an error from line 157 in record.py (pymarc 2.33) where the indicator is being parsed from a list. Would it be possible to instead place those in the Field constructor on line 165 as:
indicators = subs[0][0:2] so that errors in the indicator can be handled in user code instead of crashing the parsing of the record completely?

This would also require a change to the field class in Field.py. Instead of parsing out a magic number of indicators (line 40):
self.indicators = indicators
for i in range(0,len(self.indicators)):
  setattr(self,'indicator%s' % (str(i+1)),self.indicators[i])

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.