avoid redundant exception output in Python 3 build