:+1:

On Feb 12, 2014, at 5:22 PM, adamrp <notifications@github.com> wrote:

> In user_scripts/insertplatemap.py:
> 
> > +    for line in platemaplines:
> > +        #print line
> > +        line = line.split(',')
> > +        if 'Plate' in line[0] and line[1] != '1':
> > +            #new plate we only care about the first line
> > +            platename=line[0]
> > +            sqlstmt = "insert into plate (plate_id, plate) values (seq_plate_id.nextval, '%s');\n" % platename
> > +            sqloutfile.write(sqlstmt)
> > +        elif line[0] != '':
> > +            #this line contains barcodes
> > +            if len(line[0]) == 1:
> > +                for barcode in line[1:]:
> > +                    if barcode != '':
> > +                        try:
> > +                            barcode = int(barcode)
> > +                        except:
> If the line above fails, it will be a ValueError, so might as well use except ValueError here
> 
> —
> Reply to this email directly or view it on GitHub.
>