Handle regular socket errors gracefully in ipa command

ticket 382
This commit is contained in:
Rob Crittenden 2010-10-14 17:21:11 -04:00
parent 2f6fa22ab0
commit 264413bcb9

View File

@ -43,6 +43,7 @@ from ipalib import errors
from ipalib.request import context
from ipapython import ipautil, dnsclient
import httplib
import socket
from ipapython.nsslib import NSSHTTPS, NSSConnection
from nss.error import NSPRError
from urllib2 import urlparse
@ -370,3 +371,5 @@ class xmlclient(Connectible):
raise NetworkError(uri=server, error=str(e))
except ProtocolError, e:
raise NetworkError(uri=server, error=e.errmsg)
except socket.error, e:
raise NetworkError(uri=server, error=str(e))