diff --git a/swift/cli/info.py b/swift/cli/info.py index 9f893f6037..597303793d 100644 --- a/swift/cli/info.py +++ b/swift/cli/info.py @@ -35,7 +35,7 @@ def print_ring_locations(ring, datadir, account, container=None): :param ring: ring instance :param datadir: high level directory to store account/container/objects - :param acount: account name + :param account: account name :param container: container name """ if ring is None or datadir is None or account is None: diff --git a/swift/common/db.py b/swift/common/db.py index 192d17d371..e3346bea3e 100644 --- a/swift/common/db.py +++ b/swift/common/db.py @@ -209,7 +209,7 @@ class DatabaseBroker(object): def __str__(self): """ - Returns a string indentifying the entity under broker to a human. + Returns a string identifying the entity under broker to a human. The baseline implementation returns a full pathname to a database. This is vital for useful diagnostics. """ diff --git a/swift/common/manager.py b/swift/common/manager.py index 28e9283376..77e3285ac9 100644 --- a/swift/common/manager.py +++ b/swift/common/manager.py @@ -242,7 +242,7 @@ class Manager(object): print _("%s (%s) appears to have stopped") % (server, killed_pid) killed_pids.add(killed_pid) if not killed_pids.symmetric_difference(signaled_pids): - # all proccesses have been stopped + # all processes have been stopped return 0 # reached interval n watch_pids w/o killing all servers diff --git a/swift/common/memcached.py b/swift/common/memcached.py index 59ca38c059..f748579d79 100644 --- a/swift/common/memcached.py +++ b/swift/common/memcached.py @@ -207,7 +207,7 @@ class MemcacheRing(object): pass if got_connection: # We need to return something to the pool - # A new connection will be created the next time it is retreived + # A new connection will be created the next time it is retrieved self._return_conn(server, None, None) now = time.time() self._errors[server].append(time.time()) diff --git a/swift/common/middleware/proxy_logging.py b/swift/common/middleware/proxy_logging.py index a6e406f5bd..d8a8b8736d 100644 --- a/swift/common/middleware/proxy_logging.py +++ b/swift/common/middleware/proxy_logging.py @@ -191,7 +191,7 @@ class ProxyLoggingMiddleware(object): start_time_str, end_time_str ))) - # Log timing and bytes-transfered data to StatsD + # Log timing and bytes-transferred data to StatsD metric_name = self.statsd_metric_name(req, status_int, method) # Only log data for valid controllers (or SOS) to keep the metric count # down (egregious errors will get logged by the proxy server itself). diff --git a/swift/common/ring/ring.py b/swift/common/ring/ring.py index 61482094dc..8caa5b8b6b 100644 --- a/swift/common/ring/ring.py +++ b/swift/common/ring/ring.py @@ -172,7 +172,7 @@ class Ring(object): self._part_shift = ring_data._part_shift self._rebuild_tier_data() - # Do this now, when we know the data has changed, rather then + # Do this now, when we know the data has changed, rather than # doing it on every call to get_more_nodes(). regions = set() zones = set() diff --git a/swift/common/swob.py b/swift/common/swob.py index 68b19cf875..26e0bf912e 100644 --- a/swift/common/swob.py +++ b/swift/common/swob.py @@ -953,7 +953,7 @@ class Request(object): :param rest_with_last: If True, trailing data will be returned as part of last segment. If False, and there is trailing data, raises ValueError. - :returns: list of segments with a length of maxsegs (non-existant + :returns: list of segments with a length of maxsegs (non-existent segments will return as None) :raises: ValueError if given an invalid path """ diff --git a/swift/common/utils.py b/swift/common/utils.py index 02ef18464b..fcbc1b0f79 100644 --- a/swift/common/utils.py +++ b/swift/common/utils.py @@ -630,7 +630,7 @@ def split_path(path, minsegs=1, maxsegs=None, rest_with_last=False): :param rest_with_last: If True, trailing data will be returned as part of last segment. If False, and there is trailing data, raises ValueError. - :returns: list of segments with a length of maxsegs (non-existant + :returns: list of segments with a length of maxsegs (non-existent segments will return as None) :raises: ValueError if given an invalid path """ diff --git a/swift/container/backend.py b/swift/container/backend.py index a72da20aae..38cdaac89e 100644 --- a/swift/container/backend.py +++ b/swift/container/backend.py @@ -52,7 +52,7 @@ class ContainerBroker(DatabaseBroker): def create_object_table(self, conn): """ - Create the object table which is specifc to the container DB. + Create the object table which is specific to the container DB. Not a part of Pluggable Back-ends, internal to the baseline code. :param conn: DB connection object diff --git a/swift/obj/diskfile.py b/swift/obj/diskfile.py index 1e74815570..3bdef686a4 100644 --- a/swift/obj/diskfile.py +++ b/swift/obj/diskfile.py @@ -26,7 +26,7 @@ classes. An example alternative implementation can be found in the The `DiskFileManager` is a reference implemenation specific class and is not part of the backend API. -The remaining methods in this module are considered implementation specifc and +The remaining methods in this module are considered implementation specific and are also not considered part of the backend API. """ diff --git a/test/probe/test_replication_servers_working.py b/test/probe/test_replication_servers_working.py index dae315ac26..07416bb9cd 100644 --- a/test/probe/test_replication_servers_working.py +++ b/test/probe/test_replication_servers_working.py @@ -71,7 +71,7 @@ class TestReplicatorFunctions(TestCase): Class for testing replicators and replication servers. By default configuration - replication servers not used. - For testing separete replication servers servers need to change + For testing separate replication servers servers need to change ring's files using set_info command or new ring's files with different port values. """ diff --git a/test/unit/common/test_constraints.py b/test/unit/common/test_constraints.py index b897aa475a..c6539cf3d7 100644 --- a/test/unit/common/test_constraints.py +++ b/test/unit/common/test_constraints.py @@ -312,7 +312,7 @@ class TestConstraintsConfig(unittest.TestCase): # file is now deleted... with mock.patch.object(utils, 'SWIFT_CONF_FILE', f.name): constraints.reload_constraints() - # no constraints have been loaded from non-existant swift.conf + # no constraints have been loaded from non-existent swift.conf self.assertFalse(constraints.SWIFT_CONSTRAINTS_LOADED) # no constraints are in OVERRIDE self.assertEquals([], constraints.OVERRIDE_CONSTRAINTS.keys()) diff --git a/test/unit/common/test_manager.py b/test/unit/common/test_manager.py index 987782d303..512e98f87c 100644 --- a/test/unit/common/test_manager.py +++ b/test/unit/common/test_manager.py @@ -1030,7 +1030,7 @@ class TestServer(unittest.TestCase): manager.WARNING_WAIT = 0.01 manager.time = MockTime() with open(os.path.join(t, 'output'), 'w+') as f: - # acctually capture the read stdout (for prints) + # actually capture the read stdout (for prints) sys.stdout = f # test closing pipe in subprocess unblocks read with MockProcess() as proc: diff --git a/test/unit/common/test_swob.py b/test/unit/common/test_swob.py index b7438dfead..b3a0a9329b 100644 --- a/test/unit/common/test_swob.py +++ b/test/unit/common/test_swob.py @@ -386,7 +386,7 @@ class TestRequest(unittest.TestCase): else: self.assert_(False, "invalid req_environ_property " "didn't raise error!") - # non-existant attribute + # non-existent attribute try: swift.common.swob.Request.blank('/', params_cache={'a': 'b'}) except TypeError as e: diff --git a/test/unit/container/test_backend.py b/test/unit/container/test_backend.py index 31dd30d819..56f2c584ec 100644 --- a/test/unit/container/test_backend.py +++ b/test/unit/container/test_backend.py @@ -1062,7 +1062,7 @@ def premetadata_create_container_stat_table(self, conn, put_timestamp=None): Copied from ContainerBroker before the metadata column was added; used for testing with TestContainerBrokerBeforeMetadata. - Create the container_stat table which is specifc to the container DB. + Create the container_stat table which is specific to the container DB. :param conn: DB connection object :param put_timestamp: put timestamp @@ -1135,7 +1135,7 @@ def prexsync_create_container_stat_table(self, conn, put_timestamp=None): x_container_sync_point[12] columns were added; used for testing with TestContainerBrokerBeforeXSync. - Create the container_stat table which is specifc to the container DB. + Create the container_stat table which is specific to the container DB. :param conn: DB connection object :param put_timestamp: put timestamp diff --git a/test/unit/obj/test_ssync_receiver.py b/test/unit/obj/test_ssync_receiver.py index 6c77d1af86..30eb4491ca 100644 --- a/test/unit/obj/test_ssync_receiver.py +++ b/test/unit/obj/test_ssync_receiver.py @@ -40,7 +40,7 @@ class TestReceiver(unittest.TestCase): utils.HASH_PATH_SUFFIX = 'endcap' utils.HASH_PATH_PREFIX = 'startcap' # Not sure why the test.unit stuff isn't taking effect here; so I'm - # reenforcing it. + # reinforcing it. diskfile.getxattr = unit._getxattr diskfile.setxattr = unit._setxattr self.testdir = os.path.join( diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py index 788aa6016e..bf63d467a0 100644 --- a/test/unit/proxy/test_server.py +++ b/test/unit/proxy/test_server.py @@ -4232,17 +4232,17 @@ class TestContainerController(unittest.TestCase): # return 200 and cache 200 for and container test_status_map((200, 200, 404, 404), 200, 200, 200) test_status_map((200, 200, 500, 404), 200, 200, 200) - # return 304 dont cache container + # return 304 don't cache container test_status_map((200, 304, 500, 404), 304, None, 200) # return 404 and cache 404 for container test_status_map((200, 404, 404, 404), 404, 404, 200) test_status_map((200, 404, 404, 500), 404, 404, 200) - # return 503, dont cache container + # return 503, don't cache container test_status_map((200, 500, 500, 500), 503, None, 200) self.assertFalse(self.app.account_autocreate) # In all the following tests cache 404 for account - # return 404 (as account is not found) and dont cache container + # return 404 (as account is not found) and don't cache container test_status_map((404, 404, 404), 404, None, 404) # This should make no difference self.app.account_autocreate = True @@ -5072,7 +5072,7 @@ class TestContainerController(unittest.TestCase): req = Request.blank('/v1/a/c', method='PUT', headers={'': ''}) with save_globals(): - new_connect = set_http_connect(200, # account existance check + new_connect = set_http_connect(200, # account existence check 201, 201, 201, give_connect=capture_timestamps) resp = self.app.handle_request(req) @@ -5081,7 +5081,7 @@ class TestContainerController(unittest.TestCase): self.assertRaises(StopIteration, new_connect.code_iter.next) self.assertEqual(2, resp.status_int // 100) - timestamps.pop(0) # account existance check + timestamps.pop(0) # account existence check self.assertEqual(3, len(timestamps)) for timestamp in timestamps: self.assertEqual(timestamp, timestamps[0]) @@ -5097,7 +5097,7 @@ class TestContainerController(unittest.TestCase): req = Request.blank('/v1/a/c', method='DELETE', headers={'': ''}) self.app.update_request(req) with save_globals(): - new_connect = set_http_connect(200, # account existance check + new_connect = set_http_connect(200, # account existence check 201, 201, 201, give_connect=capture_timestamps) resp = self.app.handle_request(req) @@ -5106,7 +5106,7 @@ class TestContainerController(unittest.TestCase): self.assertRaises(StopIteration, new_connect.code_iter.next) self.assertEqual(2, resp.status_int // 100) - timestamps.pop(0) # account existance check + timestamps.pop(0) # account existence check self.assertEqual(3, len(timestamps)) for timestamp in timestamps: self.assertEqual(timestamp, timestamps[0])