Refactor: python: Fix a couple of the more egregious code blocks.
After playing with automatic formatting tools for a while, it seems like
we don't actually want to use one on our python source. However, those
tools did reformat certain blocks in a way that points out flaws with
how they were formatted in the first place. Fix a couple of the
obviously gross ones.