Python PyQt not updating until if statement is done

Published --