misc/cwfs/cwfs.py
branchtls-sprint
changeset 1802 d628defebc17
parent 0 b97547f5f1fa
child 1977 606923dff11b
--- a/misc/cwfs/cwfs.py	Thu May 14 10:24:56 2009 +0200
+++ b/misc/cwfs/cwfs.py	Thu May 14 11:38:40 2009 +0200
@@ -24,7 +24,7 @@
                                ] ),
                  })
 
-    
+
 
 DATA = { 'societe': [ ('CETIAD', 'Dijon'),
                       ('EDF_R&D', 'Clamart'),
@@ -58,7 +58,7 @@
         self._attr = None
         self._rel = None
         self._restrictions = []
-        
+
     def parse(self) :
         self._entity = self._components.next()
         try:
@@ -97,7 +97,7 @@
             for nom, entity in self.schema.get_relations(self._entity) :
                 yield nom+'/'
                 yield entity+'/'
-    
+
 def ls(path) :
     p = PathParser(SCHEMA,path)
     p.parse()
@@ -113,7 +113,7 @@
         self._e_type = None
         self._restrictions = []
         self._alphabet = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
-        
+
     def parse(self):
         self._var = self._alphabet.pop(0)
         self._e_type = self._components.next()
@@ -124,7 +124,7 @@
         except StopIteration :
             pass
         return 'Any %s WHERE %s' % (self._var, ', '.join(self._restrictions))
-    
+
     def process_entity(self) :
         _next = self._components.next()
         if _next in self.schema.get_attrs(self._e_type) :
@@ -147,9 +147,9 @@
                 self._restrictions.append('%s is %s' % (r_var, _next.capitalize()))
             except StopIteration:
                 raise
-        self.process_entity()            
+        self.process_entity()
 
-        
+
 def to_rql(path) :
     p = SytPathParser(SCHEMA,path)
     return p.parse()