Browse Source

Small bugfixes + pep8

Yann Weber 8 years ago
parent
commit
d5cf4cf668

+ 2
- 2
lodel/plugin/datasource_plugin.py View File

@@ -41,8 +41,8 @@ reimplemented by plugin datasource child class")
41 41
     #@param offset int: used with limit to choose the start record
42 42
     #@param instanciate bool : If true, the records are returned as instances, else they are returned as dict
43 43
     #@return list
44
-    def select(self, target, field_list, filters, rel_filters=None, order=None, group=None, limit=None, offset=0,
45
-               instanciate=True):
44
+    def select(self, target, field_list, filters, relational_filters=None,
45
+            order=None, group=None, limit=None, offset=0, instanciate=True):
46 46
         self._abs_err()
47 47
 
48 48
     ##@brief Deletes records according to given filters

+ 3
- 2
lodel/plugins/lodelsite_datasource/fs_utils.py View File

@@ -8,6 +8,7 @@ from lodel.context import LodelContext
8 8
 from lodel import buildconf #No need to protect it in Contexts
9 9
 
10 10
 LodelContext.expose_modules(globals(), {
11
+    'lodel.logger' : 'logger',
11 12
     'lodel.plugin.datasource_plugin': ['AbstractDatasource', 'DatasourcePlugin'],
12 13
     'lodel.exceptions': ['LodelFatalError'],
13 14
     'lodel.settings': 'Settings'})
@@ -101,7 +102,7 @@ lodelsite "%s", file exists')
101 102
 lodelsite "%s" : %s' % (name, e))
102 103
     
103 104
     #Child directories
104
-    for mname, ccd in (('datas', data_path), ('ctx', ctx_path)):
105
+    for mname, ccd in [('datas', data_path), ('ctx', ctx_path)]:
105 106
         ccd = data_path
106 107
         for d in LODELSITE_INSTALL_MODEL[mname]:
107 108
             to_create = os.path.join(ccd, d)
@@ -178,7 +179,7 @@ def make_confs(sitename, groups, extensions):
178 179
 ##@brief Delete all files related to a site
179 180
 #@warning can lead to dirty bugs if the site is running...
180 181
 def purge(sitename):
181
-    for todel in name2paths:
182
+    for todel in name2paths(sitename):
182 183
         try:
183 184
             shutil.rmtree(todel)
184 185
         except Exception as e:

+ 3
- 3
lodel/plugins/lodelsite_datasource/main.py View File

@@ -64,10 +64,10 @@ class Datasource(AbstractDatasource):
64 64
     #@param offset int: used with limit to choose the start record
65 65
     #@param instanciate bool : If true, the records are returned as instances, else they are returned as dict
66 66
     #@return list
67
-    def select(self, target, field_list, filters, rel_filters=None, order=None, group=None, limit=None, offset=0,
68
-               instanciate=True):
67
+    def select(self, target, field_list, filters, relational_filters=None, 
68
+    	order=None, group=None, limit=None, offset=0, instanciate=True):
69 69
         return self._child_ds_ro.select(
70
-            target, field_list, rel_filters, order, group, limit, offset)
70
+            target, field_list, relational_filters, order, group, limit, offset)
71 71
 
72 72
     ##@brief Deletes records according to given filters
73 73
     #@note lazy filters evaluation implementation : to evaluate filters &

Loading…
Cancel
Save