Project

General

Profile

« Previous | Next » 

Revision 1642

inputs/REMIB/src/nodes.all.specimens.csv.make: Raise InputException instead of AssertionError if invalid metadata row, so that it will be caught and printed instead of aborting the program

View differences:

nodes.all.specimens.csv.make
69 69
                util.skip(stream, is_ignore) # skip header
70 70
                try:
71 71
                    metadata_row = csv.reader(stream).next()
72
                    assert metadata_row[0] == 'COLLECTION'
72
                    if metadata_row[1] != 'COLLECTION': raise InputException(
73
                        'Invalid metadata row: '+str(metadata_row))
73 74
                except StopIteration:
74 75
                    done = True # empty response means no more nodes
75 76
                

Also available in: Unified diff