Message ID | 1401915726-29092-4-git-send-email-dros@primarydata.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/nfs4.1/dataserver.py b/nfs4.1/dataserver.py index 65e4f55..b8dd903 100644 --- a/nfs4.1/dataserver.py +++ b/nfs4.1/dataserver.py @@ -9,6 +9,7 @@ import nfs4client import hashlib import sys import nfs4_ops as op +import socket log = logging.getLogger("Dataserver Manager") @@ -197,7 +198,7 @@ class DSDevice(object): ds = DataServer(server, port, path, mdsds=self.mdsds, multipath_servers=server_list) self.list.append(ds) - except: + except socket.error: log.critical("cannot access %s:%i/%s" % (server, port, '/'.join(path))) sys.exit(1)
This specifically checks for the error being reported, otherwise a other exceptions like a programming error will be caught and treated as connection errors. Signed-off-by: Weston Andros Adamson <dros@primarydata.com> --- nfs4.1/dataserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)