* Fix a problem where the newly provided mode is a string This fixes #3597 * Implement python3-compatible get_exception() handling