I have not tried to debug your code, but it seems pretty typical for a simple ad hoc parser - a state machine, implemented with if-statements and state variables (those you give None at the beginning).
I do not know if you are writing one-time script or a part of larger system, but if you want to make it in a more elegant way, then some python library could be used, which will allow you to describe the grammar of the FASTQ in an declarative way.
For example, pyparsing or lepl could be used.
The grammar of FASTQ is in fact very simple (judging by what is written on the Wikipedia page), so the grammar would be quite simple too. It may even be you will find official grammar for the FASTQ, which will make maintanace of the code very simple and bug-free too with more confidence.
See also http://stackoverflow.com/questions/223866/elegant-structured-text-file-parsinghttps://stackoverflow.com/questions/223866/elegant-structured-text-file-parsing