Please remove the else block here, it isn't necessary - the break cond will exit the block, and the extra indentation makes the code harder to read.