Merge "Fix typos in code comments & docstrings"

This commit is contained in:
Jenkins 2014-07-17 09:31:40 +00:00 committed by Gerrit Code Review
commit 5ad1ca6efa
7 changed files with 9 additions and 9 deletions

View File

@ -120,7 +120,7 @@ def get_handler_cls():
if cfg.CONF.api.enable_reverse_dns_lookup: if cfg.CONF.api.enable_reverse_dns_lookup:
return super(CeilometerHandler, self).address_string() return super(CeilometerHandler, self).address_string()
else: else:
# disable reverse dns lookup, directly return ip adress # disable reverse dns lookup, directly return ip address
return self.client_address[0] return self.client_address[0]
return CeilometerHandler return CeilometerHandler

View File

@ -291,7 +291,7 @@ class NotificationEventsConverter(object):
(e.g. 'payload.host') or dictionary syntax (e.g. 'payload[host]') is (e.g. 'payload.host') or dictionary syntax (e.g. 'payload[host]') is
also supported. also supported.
In either case, if the key for the field you are looking for contains In either case, if the key for the field you are looking for contains
special charecters, like '.', it will need to be quoted (with double special characters, like '.', it will need to be quoted (with double
or single quotes) like so:: or single quotes) like so::
"payload.image_meta.'org.openstack__1__architecture'" "payload.image_meta.'org.openstack__1__architecture'"

View File

@ -62,7 +62,7 @@ class _Base(plugin.CentralPollster):
# all the public images together with private images. # all the public images together with private images.
# As a result, if the user/tenant has an admin role # As a result, if the user/tenant has an admin role
# for ceilometer to collect image list, # for ceilometer to collect image list,
# the _Base.iter_images method will return a image list # the _Base.iter_images method will return an image list
# which contains duplicate images. Add the following # which contains duplicate images. Add the following
# code to avoid recording down duplicate image events. # code to avoid recording down duplicate image events.
imageIdSet = set(image.id for image in rawImageList) imageIdSet = set(image.id for image in rawImageList)

View File

@ -166,7 +166,7 @@ class RPCPublisher(publisher.PublisherBase):
# if rabbit_max_retries <= 0: # if rabbit_max_retries <= 0:
# it returns only if the msg has been sent on the amqp queue # it returns only if the msg has been sent on the amqp queue
# if rabbit_max_retries > 0: # if rabbit_max_retries > 0:
# it raises a exception if rabbitmq is unreachable # it raises an exception if rabbitmq is unreachable
# #
# the default policy just respect the rabbitmq configuration # the default policy just respect the rabbitmq configuration
# nothing special is done if rabbit_max_retries <= 0 # nothing special is done if rabbit_max_retries <= 0

View File

@ -102,7 +102,7 @@ def make_timestamp_query(func, start=None, start_op=None, end=None,
return start_row, end_row return start_row, end_row
q = [] q = []
# We dont need to dump here because get_start_end_rts returns strings # We don't need to dump here because get_start_end_rts returns strings
if rts_start: if rts_start:
q.append("SingleColumnValueFilter ('f', 'rts', <=, 'binary:%s')" % q.append("SingleColumnValueFilter ('f', 'rts', <=, 'binary:%s')" %
rts_start) rts_start)
@ -143,7 +143,7 @@ def make_query(metaquery=None, trait_query=None, **kwargs):
res_q = None res_q = None
# Query for traits differs from others. It is constructed with # Query for traits differs from others. It is constructed with
# SingleColumnValueFilter with the possibility to choose comparision # SingleColumnValueFilter with the possibility to choose comparison
# operator # operator
if trait_query: if trait_query:
trait_name = kwargs.pop('key') trait_name = kwargs.pop('key')

View File

@ -232,7 +232,7 @@ class QueryTransformer(object):
def _move_negation_to_leaf(condition): def _move_negation_to_leaf(condition):
"""Moves every not operator to the leafs. """Moves every not operator to the leafs.
Moving is going by applying the De Morgan rules and anihilating Moving is going by applying the De Morgan rules and annihilating
double negations. double negations.
""" """
def _apply_de_morgan(tree, negated_subtree, negated_op): def _apply_de_morgan(tree, negated_subtree, negated_op):
@ -259,7 +259,7 @@ class QueryTransformer(object):
_apply_de_morgan(subtree, negated_tree, negated_op) _apply_de_morgan(subtree, negated_tree, negated_op)
transform(subtree) transform(subtree)
elif negated_op == "not": elif negated_op == "not":
# two consecutive not annihilates theirselves # two consecutive not annihilates themselves
new_op = negated_tree.values()[0].keys()[0] new_op = negated_tree.values()[0].keys()[0]
subtree[new_op] = negated_tree[negated_op][new_op] subtree[new_op] = negated_tree[negated_op][new_op]
del subtree["not"] del subtree["not"]

View File

@ -134,7 +134,7 @@ class TestImagePollster(test.BaseTestCase):
side_effect=self.fake_get_glance_client)) side_effect=self.fake_get_glance_client))
def test_iter_images(self): def test_iter_images(self):
# Tests whether the iter_images method returns an unique image # Tests whether the iter_images method returns a unique image
# list when there is nothing in the cache # list when there is nothing in the cache
images = list(glance.ImagePollster(). images = list(glance.ImagePollster().
_iter_images(self.manager.keystone, {})) _iter_images(self.manager.keystone, {}))