Fix exception name in backported ssl fix.
Remove unused imports identified by pyflakes.