diff --git a/doc/source/howto_installmultinode.rst b/doc/source/howto_installmultinode.rst index 7b37cb0776..8ab73232d3 100644 --- a/doc/source/howto_installmultinode.rst +++ b/doc/source/howto_installmultinode.rst @@ -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 `_ for the most up-to-date documentation. diff --git a/swift/container/reconciler.py b/swift/container/reconciler.py index 12c81be9df..ba896ae527 100644 --- a/swift/container/reconciler.py +++ b/swift/container/reconciler.py @@ -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, diff --git a/swift/container/replicator.py b/swift/container/replicator.py index 8974535251..9fa32e4962 100644 --- a/swift/container/replicator.py +++ b/swift/container/replicator.py @@ -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: diff --git a/test/probe/common.py b/test/probe/common.py index 62988835c6..3cea02241c 100644 --- a/test/probe/common.py +++ b/test/probe/common.py @@ -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 diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py index 1b3b2e06d4..39d637d8c5 100644 --- a/test/unit/proxy/test_server.py +++ b/test/unit/proxy/test_server.py @@ -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())