|
@@ -97,7 +97,7 @@ class SqlWrapper(object):
|
97
|
97
|
started')
|
98
|
98
|
return False
|
99
|
99
|
|
100
|
|
- c.rengine = c._getEngine(read=True, sqlaloggingi=None)
|
|
100
|
+ c.rengine = c._getEngine(read=True, sqlalogging=None)
|
101
|
101
|
c.wengine = c._getEngine(read=False, sqlalogging=None)
|
102
|
102
|
return True
|
103
|
103
|
|
|
@@ -110,7 +110,7 @@ started')
|
110
|
110
|
|
111
|
111
|
@classmethod
|
112
|
112
|
def _sqllog(c,sqlalogging = None):
|
113
|
|
- return bool(sqlalogging) if sqlalogging != None else c.sqlalogging
|
|
113
|
+ return bool(sqlalogging) if sqlalogging != None else c.sqla_logging
|
114
|
114
|
|
115
|
115
|
@classmethod
|
116
|
116
|
def _getEngine(c, read=True, sqlalogging = None):
|
|
@@ -175,7 +175,6 @@ localhost')
|
175
|
175
|
- dbread (mandatory if no default db)
|
176
|
176
|
- dbwrite (mandatory if no default db)
|
177
|
177
|
"""
|
178
|
|
- return True #TODO desactivate because buggy
|
179
|
178
|
err = []
|
180
|
179
|
if 'db' not in c.config:
|
181
|
180
|
err.append('Missing "db" in configuration')
|
|
@@ -187,7 +186,8 @@ localhost')
|
187
|
186
|
if 'dbwrite' not in c.config:
|
188
|
187
|
err.append('Missing "dbwrite" in configuration and\
|
189
|
188
|
no "default" db declared')
|
190
|
|
- for db in c.config['db']:
|
|
189
|
+ for dbname in c.config['db']:
|
|
190
|
+ db = c.config['db'][dbname]
|
191
|
191
|
if 'ENGINE' not in db:
|
192
|
192
|
err.append('Missing "ENGINE" in database "'+db+'"')
|
193
|
193
|
else:
|
|
@@ -209,9 +209,9 @@ localhost')
|
209
|
209
|
'+ename+'"')
|
210
|
210
|
|
211
|
211
|
if len(err)>0:
|
212
|
|
- err_str = ""
|
|
212
|
+ err_str = "\n"
|
213
|
213
|
for e in err:
|
214
|
|
- err_str += e+"\n"
|
|
214
|
+ err_str += "\t\t"+e+"\n"
|
215
|
215
|
raise NameError('Configuration errors in LODEL2SQLWRAPPER\
|
216
|
216
|
:'+err_str)
|
217
|
217
|
|