diff mbox

[1/2] Check for None to avoid python exception.

Message ID 1403542662-8450-1-git-send-email-malahal@us.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

malahal naineni June 23, 2014, 4:57 p.m. UTC
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
---
 nfs4.0/servertests/st_delegation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py
index 4965f5a..4da3a7a 100644
--- a/nfs4.0/servertests/st_delegation.py
+++ b/nfs4.0/servertests/st_delegation.py
@@ -35,7 +35,7 @@  def _recall(c, op, cbid):
         print "CALLBACK error in _recall:", e
         res = None
     _lock.release()
-    if res.status != NFS4_OK:
+    if res is not None and res.status != NFS4_OK:
         t_error = _handle_error(c, res, ops)
         t = threading.Thread(target=t_error.run)
         t.setDaemon(1)