gracefully handle a null server resposne
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 7 Feb 2008 20:13:44 +0000 (20:13 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 7 Feb 2008 20:13:44 +0000 (20:13 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1246 9efc2488-bf62-4759-914b-345cdb29e865

src/python/osrf/ses.py

index 92b271b..ddd9009 100644 (file)
@@ -209,7 +209,9 @@ class ClientSession(Session):
         ses = ClientSession(service)
         req = ses.request2(method, list(args))
         resp = req.recv()
-        data = resp.content()
+        data = None
+        if resp:
+            data = resp.content()
         req.cleanup()
         ses.cleanup()
         return data