Update configure.py

Cleanup of the exception handling