[cig-commits] r7946 - cs/portal/trunk
leif at geodynamics.org
leif at geodynamics.org
Tue Sep 11 18:48:16 PDT 2007
Author: leif
Date: 2007-09-11 18:48:15 -0700 (Tue, 11 Sep 2007)
New Revision: 7946
Modified:
cs/portal/trunk/daemon.py
Log:
Recover in the event of a network error (e.g., "connection reset by
peer") while connecting to the portal.
Modified: cs/portal/trunk/daemon.py
===================================================================
--- cs/portal/trunk/daemon.py 2007-09-12 01:00:46 UTC (rev 7945)
+++ cs/portal/trunk/daemon.py 2007-09-12 01:48:15 UTC (rev 7946)
@@ -453,7 +453,12 @@
self.clock.tick.wait()
self.info.log("GET %s" % self.portal.runsUrl)
- infile = urllib2.urlopen(self.portal.runsUrl)
+ try:
+ infile = urllib2.urlopen(self.portal.runsUrl)
+ except Exception, e:
+ # Could be transient failure -- e.g., "connection reset by peer".
+ self.info.log("error: %s" % e)
+ continue
self.info.log("OK")
runList = infile.read()
infile.close()
More information about the cig-commits
mailing list