[Checkins] SVN: Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/service.py 2.12 support

Godefroid Chapelle gotcha at bubblenet.be
Mon Jan 10 11:41:29 EST 2011


Log message for revision 119472:
  2.12 support

Changed:
  U   Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/service.py

-=-
Modified: Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/service.py
===================================================================
--- Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/service.py	2011-01-10 15:20:03 UTC (rev 119471)
+++ Sandbox/gotcha/five.taskqueue/trunk/src/five/taskqueue/service.py	2011-01-10 16:41:29 UTC (rev 119472)
@@ -1,15 +1,21 @@
-import sys
 
 from BTrees.IOBTree import IOBTree
 from OFS.SimpleItem import SimpleItem
 
+try:
+    from BTrees import family32
+    MAXINT = family32.maxint
+except ImportError:
+    import sys
+    MAXINT = sys.maxint
+
 from z3c.taskqueue.baseservice import BaseTaskService
 from five.taskqueue import processor
 
 
 class TaskService(BaseTaskService, SimpleItem):
     containerClass = IOBTree
-    maxint = sys.maxint
+    maxint = MAXINT
 
     processorFactory = processor.SimpleProcessor
 



More information about the checkins mailing list