[PATCH] nfs41client: fix raising an error when pnfs test hits non pnfs server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fail function is not defined

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@xxxxxxx>
---
 nfs4.1/nfs4client.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nfs4.1/nfs4client.py b/nfs4.1/nfs4client.py
index f06d9c5..3d55f96 100644
--- a/nfs4.1/nfs4client.py
+++ b/nfs4.1/nfs4client.py
@@ -1,7 +1,7 @@
 import use_local # HACK so don't have to rebuild constantly
 import rpc.rpc as rpc
 import nfs4lib
-from nfs4lib import NFS4Error, NFS4Replay, inc_u32
+from nfs4lib import NFS4Error, NFS4Replay, inc_u32, UnexpectedCompoundRes
 from xdrdef.nfs4_type import *
 from xdrdef.nfs4_const import *
 from xdrdef.sctrl_pack import SCTRLPacker, SCTRLUnpacker
@@ -331,7 +331,7 @@ class NFS4Client(rpc.Client, rpc.Server):
         # Make sure E_ID returns MDS capabilities
         c = self.new_client(name, flags=flags)
         if not c.flags & EXCHGID4_FLAG_USE_PNFS_MDS:
-            fail("Server can not be used as pnfs metadata server")
+            raise UnexpectedCompoundRes("Server can not be used as pnfs metadata server")
         s = c.create_session(sec=sec)
         s.compound([op4.reclaim_complete(FALSE)])
         return s
-- 
2.26.2




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux