mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Catch and handle HTTP exceptions (like 401, 404, etc)
This commit is contained in:
parent
017f236d6a
commit
904e555404
@ -35,7 +35,7 @@ import threading
|
||||
import socket
|
||||
import os
|
||||
import errno
|
||||
from xmlrpclib import Binary, Fault, dumps, loads, ServerProxy, Transport
|
||||
from xmlrpclib import Binary, Fault, dumps, loads, ServerProxy, Transport, ProtocolError
|
||||
import kerberos
|
||||
from ipalib.backend import Connectible
|
||||
from ipalib.errors import public_errors, PublicError, UnknownError, NetworkError
|
||||
@ -418,3 +418,5 @@ class xmlclient(Connectible):
|
||||
)
|
||||
except socket.error, e:
|
||||
raise NetworkError(uri=self.env.xmlrpc_uri, error=e.args[1])
|
||||
except ProtocolError, e:
|
||||
raise NetworkError(uri=self.env.xmlrpc_uri, error=e.errmsg)
|
||||
|
Loading…
Reference in New Issue
Block a user