refactor
pep8
return soon and remove part of code that would never be reached

Return soon to avoid process unnecessary code.