Here is the relevant part of the function:
flanks = open("flanks" + str(organism) + ".fasta", "w") #[...] for record in flanks: if len(record.seq)<200: print record.id, str(len(record.seq))+"bp", "unflanked element"
This returns: NT_086568.2127 132bp unflanked element
However, if I find the relevant ID in the file called by hits I find an undeniably 200bp FASTA sequence in its usual format amongst hundreds of other 200bp FASTA sequences that are never mentioned.
If I alter the script to also return record.seq:
for record in hits: if len(record.seq)<200: print record.id, record.seq str(len(record.seq))+"bp", "unflanked element"
And then ctrl+f this sequence in the relevant file I see this: http://i.imgur.com/eIE1Yqb.png
I think this shows the sequence isn't 200bp.