backport stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 08 Feb 2010 21:27:30 +0100
changeset 4510 8dc44329f5c8
parent 4509 a17033cfc892 (current diff)
parent 4505 a82af6b000f2 (diff)
child 4511 270a75f6e33f
backport stable
server/session.py
utils.py
--- a/server/session.py	Mon Feb 08 21:22:10 2010 +0100
+++ b/server/session.py	Mon Feb 08 21:27:30 2010 +0100
@@ -485,7 +485,10 @@
                     for operation in processed:
                         operation.handle_event('revert%s_event' % trstate)
                     # res
-                    self.pending_operations[:] = processed + self.pending_operations
+
+                    # XXX self.pending_operations is supposed to be
+                    # read-only, and we are clearly modifying it here.
+                    self.pending_operations[:] = processed + self.pending_operations 
                     self.rollback(reset_pool)
                     raise
             self.pool.commit()
--- a/utils.py	Mon Feb 08 21:22:10 2010 +0100
+++ b/utils.py	Mon Feb 08 21:27:30 2010 +0100
@@ -1,4 +1,4 @@
-"""Some utilities for CubicWeb server/clients.
+ """Some utilities for CubicWeb server/clients.
 
 :organization: Logilab
 :copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
@@ -16,13 +16,10 @@
 from md5 import md5
 from time import time
 from random import randint, seed
-import decimal
 
 # initialize random seed from current time
 seed()
 
-
-
 if sys.version_info[:2] < (2, 5):
     def make_uid(key):
         """forge a unique identifier