Import socket.error so the code throws the correct exception
Merge pull request #3 from abadger/feature/socket-exception-import

Import socket.error so the code throws the correct exception