py: Fix reraise logic.