Fix misspellings in glance

Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: Ib65747384763fa43bcf2441669d9903181c65cc6
Closes-Bug: #1257295
This commit is contained in:
Shane Wang 2014-02-07 14:49:17 +08:00
parent 8782526a91
commit e85da5ba21
4 changed files with 12 additions and 12 deletions

View File

@ -75,19 +75,19 @@ def get_ordered_locations(locations, uri_key='url', **kwargs):
"""
def _foreach_store_type_preference():
store_types = CONF.store_type_location_strategy.store_type_preference
for prefered_store in store_types:
prefered_store = str(prefered_store).strip()
if not prefered_store:
for preferred_store in store_types:
preferred_store = str(preferred_store).strip()
if not preferred_store:
continue
yield prefered_store
yield preferred_store
if not locations:
return locations
preferences = {}
others = []
for prefered_store in _foreach_store_type_preference():
preferences[prefered_store] = []
for preferred_store in _foreach_store_type_preference():
preferences[preferred_store] = []
for location in locations:
uri = location.get(uri_key)
@ -109,8 +109,8 @@ def get_ordered_locations(locations, uri_key='url', **kwargs):
ret = []
# NOTE(zhiyan): While configuration again since py26 does not support
# ordereddict container.
for prefered_store in _foreach_store_type_preference():
ret.extend(preferences[prefered_store])
for preferred_store in _foreach_store_type_preference():
ret.extend(preferences[preferred_store])
ret.extend(others)

View File

@ -45,7 +45,7 @@ CONF = cfg.CONF
CONF.register_opts(property_opts)
# NOTE (spredzy): Due to the particularly lengthy name of the exception
# and the number of occurence it is raise in this file, a variable is
# and the number of occurrence it is raise in this file, a variable is
# created
InvalidPropProtectConf = exception.InvalidPropertyProtectionConfiguration

View File

@ -369,7 +369,7 @@ class Store(glance.store.base.Store):
:image_size size of image being uploaded.
:returns best_datadir as directory path of the best priority datadir.
:raises exception.StorageFull if there is no datadir in
self.priority_data_map that can accomodate the image.
self.priority_data_map that can accommodate the image.
"""
if not self.multiple_datadirs:
return self.datadir
@ -383,7 +383,7 @@ class Store(glance.store.base.Store):
max_free_space = free_space
best_datadir = datadir
# If datadir is found which can accomodate image and has maximum
# If datadir is found which can accommodate image and has maximum
# free space for the given priority then break the loop,
# else continue to lookup further.
if best_datadir:

View File

@ -933,7 +933,7 @@ class DriverTests(object):
actual = self.db_api.image_tag_get_all(self.context, UUID1)
self.assertEqual([], actual)
def test_image_tag_get_all_non_existant_image(self):
def test_image_tag_get_all_non_existent_image(self):
bad_image_id = str(uuid.uuid4())
actual = self.db_api.image_tag_get_all(self.context, bad_image_id)
self.assertEqual([], actual)