Fixed typos

TrivialFix

Change-Id: Id8cea90ee4bdfa2d596fd94d6b2da01f81265811
This commit is contained in:
Pavel Kholkin
2015-07-06 15:21:50 +03:00
parent e9a7df77ad
commit e4c7731a78
4 changed files with 11 additions and 12 deletions

View File

@@ -72,4 +72,4 @@ latex_documents = [
]
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
# intersphinx_mapping = {'http://docs.python.org/': None}

View File

@@ -100,7 +100,7 @@ class ConnectionPool(queue.Queue):
This is called when the pool wishes to get rid of an existing
connection. This is the opportunity for a subclass to free up
resources and cleaup after itself.
resources and cleanup after itself.
:param conn: the connection object to destroy

View File

@@ -312,7 +312,7 @@ class MongoApi(object):
}[req_type]
except KeyError:
msg = _('Invalid ssl_cert_reqs value of %s, must be one of '
'"NONE", "OPTIONAL", "REQUIRED"') % (req_type)
'"NONE", "OPTIONAL", "REQUIRED"') % req_type
raise exception.ConfigurationError(msg)
def _get_db(self):
@@ -416,8 +416,8 @@ class MongoApi(object):
'indx_name': indx_name})
def get(self, key):
critieria = {'_id': key}
result = self.get_cache_collection().find_one(spec_or_id=critieria,
criteria = {'_id': key}
result = self.get_cache_collection().find_one(spec_or_id=criteria,
**self.meth_kwargs)
if result:
return result['value']
@@ -429,8 +429,8 @@ class MongoApi(object):
return {doc['_id']: doc['value'] for doc in six.itervalues(db_results)}
def _get_results_as_dict(self, keys):
critieria = {'_id': {'$in': keys}}
db_results = self.get_cache_collection().find(spec=critieria,
criteria = {'_id': {'$in': keys}}
db_results = self.get_cache_collection().find(spec=criteria,
**self.meth_kwargs)
return {doc['_id']: doc for doc in db_results}
@@ -472,13 +472,13 @@ class MongoApi(object):
**self.meth_kwargs)
def delete(self, key):
critieria = {'_id': key}
self.get_cache_collection().remove(spec_or_id=critieria,
criteria = {'_id': key}
self.get_cache_collection().remove(spec_or_id=criteria,
**self.meth_kwargs)
def delete_multi(self, keys):
critieria = {'_id': {'$in': keys}}
self.get_cache_collection().remove(spec_or_id=critieria,
criteria = {'_id': {'$in': keys}}
self.get_cache_collection().remove(spec_or_id=criteria,
**self.meth_kwargs)

View File

@@ -222,7 +222,6 @@ class MockCollection(object):
class MockMongoDB(object):
def __init__(self, dbname):
self._dbname = dbname
self.mainpulator = None
def authenticate(self, username, password):
pass