[Opensrf-commits] r2136 - trunk/src/python (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Dec 19 21:54:34 EST 2010
Author: erickson
Date: 2010-12-19 21:54:32 -0500 (Sun, 19 Dec 2010)
New Revision: 2136
Modified:
trunk/src/python/srfsh.py
Log:
repaired bug in total request time calc, particularly when a request returns no response
Modified: trunk/src/python/srfsh.py
===================================================================
--- trunk/src/python/srfsh.py 2010-12-20 02:31:20 UTC (rev 2135)
+++ trunk/src/python/srfsh.py 2010-12-20 02:54:32 UTC (rev 2136)
@@ -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