mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Catch name resolution errors coming from the socket module.
442650
This commit is contained in:
@@ -33,6 +33,7 @@ try:
|
||||
import krbV
|
||||
import ldap
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -198,6 +199,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -32,6 +32,7 @@ try:
|
||||
import kerberos
|
||||
import ldap
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -134,6 +135,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -35,6 +35,7 @@ try:
|
||||
import ldap
|
||||
import getpass
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -101,6 +102,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -33,6 +33,7 @@ try:
|
||||
import ldap
|
||||
import getpass
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -268,6 +269,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -28,6 +28,7 @@ try:
|
||||
import kerberos
|
||||
import copy
|
||||
import errno
|
||||
import socket
|
||||
|
||||
import ipa.aci
|
||||
from ipa import ipaerror
|
||||
@@ -140,6 +141,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -25,6 +25,7 @@ try:
|
||||
import ipa.config
|
||||
import ipa.ipautil as ipautil
|
||||
import errno
|
||||
import socket
|
||||
|
||||
import xmlrpclib
|
||||
import kerberos
|
||||
@@ -102,6 +103,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -30,6 +30,7 @@ try:
|
||||
import krbV
|
||||
import ldap
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -106,6 +107,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -25,6 +25,7 @@ try:
|
||||
import ipa.ipautil as ipautil
|
||||
import ipa.config
|
||||
import errno
|
||||
import socket
|
||||
|
||||
import xmlrpclib
|
||||
import kerberos
|
||||
@@ -87,6 +88,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -29,6 +29,7 @@ try:
|
||||
import sys
|
||||
import xmlrpclib
|
||||
import kerberos
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -154,6 +155,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -29,6 +29,7 @@ try:
|
||||
import sys
|
||||
import xmlrpclib
|
||||
import kerberos
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -102,6 +103,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -31,6 +31,7 @@ try:
|
||||
import sys
|
||||
import xmlrpclib
|
||||
import kerberos
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -165,6 +166,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -28,6 +28,7 @@ try:
|
||||
import xmlrpclib
|
||||
import kerberos
|
||||
import errno
|
||||
import socket
|
||||
|
||||
import ipa.aci
|
||||
from ipa import ipaerror
|
||||
@@ -119,6 +120,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipaerror.IPAError, e:
|
||||
print("Delegation list failed: " + str(e))
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -25,6 +25,7 @@ try:
|
||||
import ipa.config
|
||||
import ipa.ipautil as ipautil
|
||||
import errno
|
||||
import socket
|
||||
|
||||
import xmlrpclib
|
||||
import kerberos
|
||||
@@ -106,6 +107,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -33,6 +33,7 @@ try:
|
||||
import ldap
|
||||
import copy
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -236,6 +237,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -30,6 +30,7 @@ try:
|
||||
import kerberos
|
||||
import ldap
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -227,6 +228,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -31,6 +31,7 @@ try:
|
||||
import kerberos
|
||||
import ldap
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -293,6 +294,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -30,6 +30,7 @@ try:
|
||||
import ldap
|
||||
import getpass
|
||||
import errno
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -142,6 +143,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -29,6 +29,7 @@ try:
|
||||
import kerberos
|
||||
import errno
|
||||
import validate
|
||||
import socket
|
||||
except ImportError:
|
||||
print >> sys.stderr, """\
|
||||
There was a problem importing one of the required Python modules. The
|
||||
@@ -147,6 +148,9 @@ except xmlrpclib.ProtocolError, e:
|
||||
except ipa.ipaerror.IPAError, e:
|
||||
print "%s" % (e.message)
|
||||
sys.exit(1)
|
||||
except socket.error, e:
|
||||
print e[1]
|
||||
print "Re-run with -v flag for more details."
|
||||
except Exception, e:
|
||||
print "%s" % str(e)
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user