Python 3 support (exceptions import is not needed)