Fix SF#1457312: bad socket error handling in distutils "upload" command.
Fix SF#1457312: bad socket error handling in distutils "upload" command.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator