[Neo-report] r2556 gregory - /trunk/neo/client/iterator.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 16 15:33:00 CET 2010


Author: gregory
Date: Thu Dec 16 15:32:59 2010
New Revision: 2556

Log:
Make txn_list attribute private.

Modified:
    trunk/neo/client/iterator.py

Modified: trunk/neo/client/iterator.py
==============================================================================
--- trunk/neo/client/iterator.py [iso-8859-1] (original)
+++ trunk/neo/client/iterator.py [iso-8859-1] Thu Dec 16 15:32:59 2010
@@ -98,7 +98,7 @@ class Iterator(object):
 
     def __init__(self, app, start, stop):
         self.app = app
-        self.txn_list = []
+        self._txn_list = []
         assert None not in (start, stop)
         self._start = start
         self._stop = stop
@@ -122,15 +122,15 @@ class Iterator(object):
         """ Return an iterator for the next transaction"""
         if self._closed:
             raise IOError, 'iterator closed'
-        if not self.txn_list:
+        if not self._txn_list:
             (max_tid, chunk) = self.app.transactionLog(self._start, self._stop,
                 CHUNK_LENGTH)
             if not chunk:
                 # nothing more
                 raise StopIteration
             self._start = add64(max_tid, 1)
-            self.txn_list = chunk
-        txn = self.txn_list.pop(0)
+            self._txn_list = chunk
+        txn = self._txn_list.pop(0)
         self._index += 1
         tid = txn['id']
         user = txn['user_name']




More information about the Neo-report mailing list