Fix except style for python3