Writing

    except ImportError as e:

would be better (required in Python 3).