[Opensrf-commits] r2139 - branches/rel_2_0/src/python (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Dec 19 21:56:17 EST 2010


Author: erickson
Date: 2010-12-19 21:56:15 -0500 (Sun, 19 Dec 2010)
New Revision: 2139

Modified:
   branches/rel_2_0/src/python/srfsh.py
Log:
repaired bug in total request time calc, particularly when a request returns no response

Modified: branches/rel_2_0/src/python/srfsh.py
===================================================================
--- branches/rel_2_0/src/python/srfsh.py	2010-12-20 02:55:24 UTC (rev 2138)
+++ branches/rel_2_0/src/python/srfsh.py	2010-12-20 02:56:15 UTC (rev 2139)
@@ -280,6 +280,7 @@
         req = ses.request2(method, tuple(params))
 
         last_content = None
+        total = 0
         while True:
             resp = None
 
@@ -287,12 +288,12 @@
                 resp = req.recv(timeout=self.timeout)
             except osrf.net.XMPPNoRecipient:
                 self.report("Unable to communicate with %s\n" % service)
-                total = 0
                 break
 
+            total = time.time() - start
+
             if not resp: break
 
-            total = time.time() - start
             content = resp.content()
 
             if content is not None:



More information about the opensrf-commits mailing list