Fix common misspellings

Wikipedia's list of common misspellings [1] has a machine-readable
version.  This patch fixes those misspellings mentioned in the list
which don't have multiple right variants (as e.g. "accension", which can
be both "accession" and "ascension"), such misspellings are left
untouched.  The list of changes was manually re-checked for false
positives.

[1] https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

Change-Id: Ic9a5438629664f7cea216413a28acc0e8992da05
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2015-03-19 17:25:57 +01:00
parent 3e8925ae04
commit 76b106fc01
5 changed files with 10 additions and 9 deletions

View File

@ -2,7 +2,7 @@
Instructions for a Multiple Server Swift Installation
=====================================================
Please refer to the latest offical
Please refer to the latest official
`Openstack Installation Guides <http://docs.openstack.org/#install-guides>`_
for the most up-to-date documentation.

View File

@ -137,7 +137,7 @@ def get_reconciler_content_type(op):
raise ValueError('invalid operation type %r' % op)
def get_row_to_q_entry_translater(broker):
def get_row_to_q_entry_translator(broker):
account = broker.account
container = broker.container
op_type = {
@ -145,7 +145,7 @@ def get_row_to_q_entry_translater(broker):
1: get_reconciler_content_type('delete'),
}
def translater(obj_info):
def translator(obj_info):
name = get_reconciler_obj_name(obj_info['storage_policy_index'],
account, container,
obj_info['name'])
@ -157,7 +157,7 @@ def get_row_to_q_entry_translater(broker):
'content_type': op_type[obj_info['deleted']],
'size': 0,
}
return translater
return translator
def add_to_reconciler_queue(container_ring, account, container, obj,

View File

@ -22,7 +22,7 @@ from eventlet import Timeout
from swift.container.backend import ContainerBroker, DATADIR
from swift.container.reconciler import (
MISPLACED_OBJECTS_ACCOUNT, incorrect_policy_index,
get_reconciler_container_name, get_row_to_q_entry_translater)
get_reconciler_container_name, get_row_to_q_entry_translator)
from swift.common import db_replicator
from swift.common.storage_policy import POLICIES
from swift.common.exceptions import DeviceUnavailable
@ -166,14 +166,14 @@ class ContainerReplicator(db_replicator.Replicator):
misplaced = broker.get_misplaced_since(point, self.per_diff)
if not misplaced:
return max_sync
translater = get_row_to_q_entry_translater(broker)
translator = get_row_to_q_entry_translator(broker)
errors = False
low_sync = point
while misplaced:
batches = defaultdict(list)
for item in misplaced:
container = get_reconciler_container_name(item['created_at'])
batches[container].append(translater(item))
batches[container].append(translator(item))
for container, item_list in batches.items():
success = self.feed_reconciler(container, item_list)
if not success:

View File

@ -198,7 +198,8 @@ def get_ring(ring_name, required_replicas, required_devices,
def get_policy(**kwargs):
kwargs.setdefault('is_deprecated', False)
# go thru the policies and make sure they match the requirements of kwargs
# go through the policies and make sure they match the
# requirements of kwargs
for policy in POLICIES:
# TODO: for EC, pop policy type here and check it first
matches = True

View File

@ -665,7 +665,7 @@ class TestProxyServer(unittest.TestCase):
class MyApp(proxy_server.Application):
def get_controller(self, path):
raise Exception('this shouldnt be caught')
raise Exception('this shouldn\'t be caught')
app = MyApp(None, FakeMemcache(), account_ring=FakeRing(),
container_ring=FakeRing())