cleanups stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 03 Mar 2010 17:42:19 +0100
branchstable
changeset 4759 af2e6c377c71
parent 4758 0efdcf0fa4c7
child 4760 fe0e307b9b70
cleanups
entity.py
schema.py
schemas/__init__.py
schemas/base.py
server/__init__.py
server/querier.py
server/session.py
--- a/entity.py	Wed Mar 03 17:39:22 2010 +0100
+++ b/entity.py	Wed Mar 03 17:42:19 2010 +0100
@@ -797,7 +797,7 @@
             del self.__unique
         except AttributeError:
             pass
-    
+
     # raw edition utilities ###################################################
 
     def set_attributes(self, _cw_unsafe=False, **kwargs):
--- a/schema.py	Wed Mar 03 17:39:22 2010 +0100
+++ b/schema.py	Wed Mar 03 17:42:19 2010 +0100
@@ -50,8 +50,9 @@
     ))
 
 WORKFLOW_TYPES = set(('Transition', 'State', 'TrInfo', 'Workflow',
-                         'WorkflowTransition', 'BaseTransition',
-                         'SubWorkflowExitPoint'))
+                      'WorkflowTransition', 'BaseTransition',
+                      'SubWorkflowExitPoint'))
+
 INTERNAL_TYPES = set(('CWProperty', 'CWPermission', 'CWCache', 'ExternalUri'))
 
 
--- a/schemas/__init__.py	Wed Mar 03 17:39:22 2010 +0100
+++ b/schemas/__init__.py	Wed Mar 03 17:42:19 2010 +0100
@@ -1,7 +1,7 @@
 """some utilities to define schema permissions
 
 :organization: Logilab
-:copyright: 2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2008-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 __docformat__ = "restructuredtext en"
--- a/schemas/base.py	Wed Mar 03 17:39:22 2010 +0100
+++ b/schemas/base.py	Wed Mar 03 17:42:19 2010 +0100
@@ -212,6 +212,8 @@
 
     Also, checkout the AppObject.get_cache() method.
     """
+    # XXX only handle by hooks, shouldn't be readable/editable at all through
+    # the ui and so no permissions should be granted, no?
     __permissions__ = {
         'read':   ('managers', 'users', 'guests'),
         'add':    ('managers',),
--- a/server/__init__.py	Wed Mar 03 17:39:22 2010 +0100
+++ b/server/__init__.py	Wed Mar 03 17:42:19 2010 +0100
@@ -186,6 +186,7 @@
     handler.install_custom_sql_scripts(join(CW_SOFTWARE_ROOT, 'schemas'), driver)
     for directory in reversed(config.cubes_path()):
         handler.install_custom_sql_scripts(join(directory, 'schema'), driver)
+    # serialize the schema
     initialize_schema(config, schema, handler)
     # yoo !
     cnx.commit()
--- a/server/querier.py	Wed Mar 03 17:39:22 2010 +0100
+++ b/server/querier.py	Wed Mar 03 17:42:19 2010 +0100
@@ -358,6 +358,7 @@
         self.preprocess(rqlst, security=False)
         return rqlst
 
+
 class InsertPlan(ExecutionPlan):
     """an execution model specific to the INSERT rql query
     """
--- a/server/session.py	Wed Mar 03 17:39:22 2010 +0100
+++ b/server/session.py	Wed Mar 03 17:42:19 2010 +0100
@@ -499,7 +499,7 @@
                         operation.handle_event('revert%s_event' % trstate)
                     # XXX use slice notation since self.pending_operations is a
                     # read-only property.
-                    self.pending_operations[:] = processed + self.pending_operations 
+                    self.pending_operations[:] = processed + self.pending_operations
                     self.rollback(reset_pool)
                     raise
             self.pool.commit()