summaryrefslogtreecommitdiffstats
path: root/ipalib/rpc.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/rpc.py')
-rw-r--r--ipalib/rpc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/rpc.py b/ipalib/rpc.py
index aa8002094..55f3ea954 100644
--- a/ipalib/rpc.py
+++ b/ipalib/rpc.py
@@ -32,10 +32,11 @@ Also see the `ipaserver.rpcserver` module.
from types import NoneType
import threading
+import socket
from xmlrpclib import Binary, Fault, dumps, loads, ServerProxy, SafeTransport
import kerberos
from ipalib.backend import Backend
-from ipalib.errors2 import public_errors, PublicError, UnknownError
+from ipalib.errors2 import public_errors, PublicError, UnknownError, NetworkError
from ipalib.request import context
@@ -265,3 +266,5 @@ class xmlclient(Backend):
error=e.faultString,
server=self.env.xmlrpc_uri,
)
+ except socket.error, e:
+ raise NetworkError(uri=self.env.xmlrpc_uri, error=e.args[1])