From 8a04c5fa874d69767a7e612cc255066f94e6d020 Mon Sep 17 00:00:00 2001 From: Ajith Dhas Date: Wed, 29 Jan 2020 20:23:22 +0530 Subject: [PATCH] Update rpc.py Verified that access to IPv6 NFS server is working fine. --- pyNfsClient/rpc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyNfsClient/rpc.py b/pyNfsClient/rpc.py index 9b43c6e..f6bd0c0 100644 --- a/pyNfsClient/rpc.py +++ b/pyNfsClient/rpc.py @@ -125,8 +125,8 @@ def request(self, program, program_version, procedure, data=None, message_type=0 return data - def connect(self): - self.client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + def connect(self, sock_family = socket.AF_INET): + self.client = socket.socket(sock_family, socket.SOCK_STREAM) self.client.settimeout(self.timeout) # if we are running as root, use a source port between 500 and 1024 (NFS security options...) random_port = None