Mercurial > libervia-backend
comparison src/tools/sqlite.py @ 423:6c20c76abdcc
backend: - bridge async D-Bus method now automatically manage callback and errback, we just have to return a deferred
- getParams, getParamsForCategory and getParamsUI are now asynchronous
primitivus: management of asynchronous getParamsUI
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 07 Nov 2011 00:09:22 +0100 |
parents | acd908528ef7 |
children | e4e9187e3b5b |
comparison
equal
deleted
inserted
replaced
422:5a18c5f08d9b | 423:6c20c76abdcc |
---|---|
122 @param profile: a profile which *must* exist | 122 @param profile: a profile which *must* exist |
123 @return: deferred""" | 123 @return: deferred""" |
124 def fillParams(result): | 124 def fillParams(result): |
125 for param in result: | 125 for param in result: |
126 category,name,value = param | 126 category,name,value = param |
127 params_ind[profile][(category, name)] = value | 127 params_ind[(category, name)] = value |
128 debug(_("loading individual parameters from database")) | 128 debug(_("loading individual parameters from database")) |
129 d = self.dbpool.runQuery("SELECT category,name,value FROM param_ind WHERE profile_id=?", (self.profiles[profile],)) | 129 d = self.dbpool.runQuery("SELECT category,name,value FROM param_ind WHERE profile_id=?", (self.profiles[profile],)) |
130 d.addCallback(fillParams) | 130 d.addCallback(fillParams) |
131 return d | 131 return d |
132 | 132 |