python: make fit for set -e