[rhmessaging-commits] rhmessaging commits: r4121 - mgmt/newdata/cumin/python/cumin/grid.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Jul 15 16:22:48 EDT 2010


Author: eallen
Date: 2010-07-15 16:22:48 -0400 (Thu, 15 Jul 2010)
New Revision: 4121

Modified:
   mgmt/newdata/cumin/python/cumin/grid/limit.py
Log:
Handle 0 negotiators better

Modified: mgmt/newdata/cumin/python/cumin/grid/limit.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/limit.py	2010-07-15 20:13:47 UTC (rev 4120)
+++ mgmt/newdata/cumin/python/cumin/grid/limit.py	2010-07-15 20:22:48 UTC (rev 4121)
@@ -27,7 +27,11 @@
 
         # TODO: why is there more than 1 negotiator?
         negs = cls.get_selection(session.cursor, Pool=collector.Pool)
-        youngest = negs[0]
+        try:
+            youngest = negs[0]
+        except IndexError:
+            return None
+
         for neg in negs:
             if neg._qmf_update_time > youngest._qmf_update_time:
                 youngest = neg



More information about the rhmessaging-commits mailing list