correct a syntax error

I introduced a syntax error during refactoring. Not sure why PEP8 didn't notice it.