diff options
author | Tomas Touceda <chiiph@leap.se> | 2013-04-24 16:47:07 -0300 |
---|---|---|
committer | Tomas Touceda <chiiph@leap.se> | 2013-04-24 16:47:07 -0300 |
commit | f56d043854cb4281c81e2ee6a6b99ff9d03ad9d6 (patch) | |
tree | 6ef945980b6a61db3d38ea0e6e123b35775f1c32 /src/leap/mx/couchdbhelper.py | |
parent | 046ef8b23c04333007276b560670f69d9011fb40 (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 |