diff options
author | Tomas Touceda <chiiph@leap.se> | 2013-04-24 16:47:07 -0300 |
---|---|---|
committer | Tomas Touceda <chiiph@leap.se> | 2013-05-07 14:01:10 -0300 |
commit | b1c2e24fb08f69a10a4d91a84ec0e31d91991190 (patch) | |
tree | ef5f2127f85b737fe035b190f6b0a7db83d7c142 /src/leap/mx/couchdbhelper.py | |
parent | b322a390af83addcf9768ae59d31c31a3229b49d (diff) |
Improve the rest and start everything from start_mx
Diffstat (limited to 'src/leap/mx/couchdbhelper.py')
-rw-r--r-- | src/leap/mx/couchdbhelper.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/leap/mx/couchdbhelper.py b/src/leap/mx/couchdbhelper.py index 4e76be3..2bbca77 100644 --- a/src/leap/mx/couchdbhelper.py +++ b/src/leap/mx/couchdbhelper.py @@ -20,6 +20,10 @@ Classes for working with CouchDB or BigCouch instances which store email alias maps, user UUIDs, and GPG keyIDs. """ +import logging + +from functools import partial + try: from paisley import client except ImportError: @@ -32,9 +36,7 @@ except ImportError: print "This software requires Twisted. Please see the README file" print "for instructions on getting required dependencies." -from functools import partial - -from leap.mx.util import log +logger = logging.getLogger(__name__) class ConnectedCouchDB(client.CouchDB): @@ -82,9 +84,9 @@ class ConnectedCouchDB(client.CouchDB): @param data: response from the listDB command @type data: array """ - log.msg("Available databases:") + logger.msg("Available databases:") for database in data: - log.msg(" * %s" % (database,)) + logger.msg(" * %s" % (database,)) def createDB(self, dbName): """ @@ -117,7 +119,7 @@ class ConnectedCouchDB(client.CouchDB): reduce=False, include_docs=True) - d.addCallbacks(partial(self._get_uuid, alias), log.err) + d.addCallbacks(partial(self._get_uuid, alias), logger.error) return d |