From 45f0502b525de72ff98b118cfbbb9627c7caf165 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Tue, 12 Feb 2013 15:38:40 -0800 Subject: [PATCH] Fix spelling mistakes git ls-files | misspellings -f - Source: https://github.com/lyda/misspell-check Change-Id: I4132e6a276e44e2a8985238358533d315ee8d9c4 --- CHANGELOG | 2 +- bin/swift-account-audit | 2 +- doc/source/admin_guide.rst | 2 +- doc/source/cors.rst | 6 +++--- swift/common/constraints.py | 3 ++- swift/common/db.py | 4 ++-- swift/common/manager.py | 2 +- swift/common/middleware/staticweb.py | 2 +- swift/common/utils.py | 4 ++-- swift/container/sync.py | 4 ++-- swift/proxy/controllers/base.py | 2 +- test/functional/swift_test_client.py | 6 +++--- test/unit/common/test_manager.py | 2 +- test/unit/common/test_utils.py | 2 +- test/unit/container/test_sync.py | 2 +- test/unit/obj/test_replicator.py | 2 +- test/unit/proxy/test_server.py | 2 +- 17 files changed, 25 insertions(+), 24 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4b27320ce1..06472e6922 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -183,7 +183,7 @@ swift (1.6.0) substantially affects the JSON output of the dispersion report, and any tools written to consume this output will need to be updated. - * Added Solaris (Illumos) compability + * Added Solaris (Illumos) compatibility * Added -a option to swift-get-nodes to show all handoffs diff --git a/bin/swift-account-audit b/bin/swift-account-audit index 000048fa1a..df025254c1 100755 --- a/bin/swift-account-audit +++ b/bin/swift-account-audit @@ -106,7 +106,7 @@ class Auditor(object): if resp.getheader('ETag').strip('"') != calc_hash: self.object_checksum_mismatch += 1 consistent = False - print ' MD5 doesnt match etag for "%s" on %s/%s' \ + print ' MD5 does not match etag for "%s" on %s/%s' \ % (path, node['ip'], node['device']) etags.append(resp.getheader('ETag')) else: diff --git a/doc/source/admin_guide.rst b/doc/source/admin_guide.rst index 9f6b04539e..d8b1c4898d 100644 --- a/doc/source/admin_guide.rst +++ b/doc/source/admin_guide.rst @@ -354,7 +354,7 @@ Request URI Description /recon/sockstat returns consumable info from /proc/net/sockstat|6 /recon/devices returns list of devices and devices dir i.e. /srv/node /recon/async returns count of async pending -/recon/replication returns object replication times (for backward compatability) +/recon/replication returns object replication times (for backward compatibility) /recon/replication/ returns replication info for given type (account, container, object) /recon/auditor/ returns auditor stats on last reported scan for given type (account, container, object) /recon/updater/ returns last updater sweep times for given type (container, object) diff --git a/doc/source/cors.rst b/doc/source/cors.rst index eb2af83f45..8ddf7d8476 100644 --- a/doc/source/cors.rst +++ b/doc/source/cors.rst @@ -24,12 +24,12 @@ The supported headers are, +----------------------------------------------+------------------------------+ |X-Container-Meta-Access-Control-Allow-Headers | Headers to be allowed in | | | actual request by browser, | -| | space seperated. | +| | space separated. | +----------------------------------------------+------------------------------+ |X-Container-Meta-Access-Control-Expose-Headers| Headers exposed to the user | | | agent (e.g. browser) in the | | | the actual request response. | -| | Space seperated. | +| | Space separated. | +----------------------------------------------+------------------------------+ Before a browser issues an actual request it may issue a `preflight request`_. @@ -70,7 +70,7 @@ header,:: -H 'X-Container-Meta-Access-Control-Allow-Origin: http://localhost' \ http://192.168.56.3:8080/v1/AUTH_test/cont1 -At this point the container is now accessable to CORS clients hosted on +At this point the container is now accessible to CORS clients hosted on http://localhost. Open the test CORS page in your browser. #. Populate the Token field diff --git a/swift/common/constraints.py b/swift/common/constraints.py index 35c9eb5efe..68880db016 100644 --- a/swift/common/constraints.py +++ b/swift/common/constraints.py @@ -153,7 +153,8 @@ def check_mount(root, drive): """ Verify that the path to the device is a mount point and mounted. This allows us to fast fail on drives that have been unmounted because of - issues, and also prevents us for accidently filling up the root partition. + issues, and also prevents us for accidentally filling up the root + partition. :param root: base path where the devices are mounted :param drive: drive name to be checked diff --git a/swift/common/db.py b/swift/common/db.py index ce7dcb264e..c6137fe73e 100644 --- a/swift/common/db.py +++ b/swift/common/db.py @@ -793,7 +793,7 @@ class ContainerBroker(DatabaseBroker): return (row[0] == 0) def _commit_puts(self, item_list=None): - """Handles commiting rows in .pending files.""" + """Handles committing rows in .pending files.""" if self.db_file == ':memory:' or not os.path.exists(self.pending_file): return if item_list is None: @@ -1320,7 +1320,7 @@ class AccountBroker(DatabaseBroker): WHERE delete_timestamp < ? """, (timestamp, timestamp, timestamp)) def _commit_puts(self, item_list=None): - """Handles commiting rows in .pending files.""" + """Handles committing rows in .pending files.""" if self.db_file == ':memory:' or not os.path.exists(self.pending_file): return if item_list is None: diff --git a/swift/common/manager.py b/swift/common/manager.py index 0232fef554..f61a53fdcc 100644 --- a/swift/common/manager.py +++ b/swift/common/manager.py @@ -82,7 +82,7 @@ def command(func): def watch_server_pids(server_pids, interval=1, **kwargs): - """Monitor a collection of server pids yeilding back those pids that + """Monitor a collection of server pids yielding back those pids that aren't responding to signals. :param server_pids: a dict, lists of pids [int,...] keyed on diff --git a/swift/common/middleware/staticweb.py b/swift/common/middleware/staticweb.py index c62b5ad96b..9963395c0a 100644 --- a/swift/common/middleware/staticweb.py +++ b/swift/common/middleware/staticweb.py @@ -56,7 +56,7 @@ Unauthorized and 404 Not Found) will instead serve the ``X-Container-Meta-Web-Error: error.html`` will serve .../404error.html for requests for paths not found. -For psuedo paths that have no , this middleware can serve HTML file +For pseudo paths that have no , this middleware can serve HTML file listings if you set the ``X-Container-Meta-Web-Listings: true`` metadata item on the container. diff --git a/swift/common/utils.py b/swift/common/utils.py index ebe4443f82..5837649624 100644 --- a/swift/common/utils.py +++ b/swift/common/utils.py @@ -146,7 +146,7 @@ class FallocateWrapper(object): self.func_name = 'posix_fallocate' self.fallocate = noop_libc_function return - ## fallocate is prefered because we need the on-disk size to match + ## fallocate is preferred because we need the on-disk size to match ## the allocated size. Older versions of sqlite require that the ## two sizes match. However, fallocate is Linux only. for func in ('fallocate', 'posix_fallocate'): @@ -1066,7 +1066,7 @@ def compute_eta(start_time, current_value, final_value): def iter_devices_partitions(devices_dir, item_type): """ - Iterate over partitions accross all devices. + Iterate over partitions across all devices. :param devices_dir: Path to devices :param item_type: One of 'accounts', 'containers', or 'objects' diff --git a/swift/container/sync.py b/swift/container/sync.py index e28d2c5160..29defa3bae 100644 --- a/swift/container/sync.py +++ b/swift/container/sync.py @@ -295,7 +295,7 @@ class ContainerSync(Daemon): break key = hash_path(info['account'], info['container'], row['name'], raw_digest=True) - # This node will only intially sync out one third of the + # This node will only initially sync out one third of the # objects (if 3 replicas, 1/4 if 4, etc.). This section # will attempt to sync previously skipped rows in case the # other nodes didn't succeed. @@ -313,7 +313,7 @@ class ContainerSync(Daemon): row = rows[0] key = hash_path(info['account'], info['container'], row['name'], raw_digest=True) - # This node will only intially sync out one third of the + # This node will only initially sync out one third of the # objects (if 3 replicas, 1/4 if 4, etc.). It'll come back # around to the section above and attempt to sync # previously skipped rows in case the other nodes didn't diff --git a/swift/proxy/controllers/base.py b/swift/proxy/controllers/base.py index 88571f3beb..1d5dcc24c7 100644 --- a/swift/proxy/controllers/base.py +++ b/swift/proxy/controllers/base.py @@ -408,7 +408,7 @@ class Controller(object): def container_info(self, account, container, account_autocreate=False): """ - Get container information and thusly verify container existance. + Get container information and thusly verify container existence. This will also make a call to account_info to verify that the account exists. diff --git a/test/functional/swift_test_client.py b/test/functional/swift_test_client.py index 2a397568c9..6c9ee7851f 100644 --- a/test/functional/swift_test_client.py +++ b/test/functional/swift_test_client.py @@ -717,15 +717,15 @@ class File(Base): self.conn.put_start(self.path, hdrs=headers, parms=parms, cfg=cfg) - transfered = 0 + transferred = 0 buff = data.read(block_size) try: while len(buff) > 0: self.conn.put_data(buff) buff = data.read(block_size) - transfered += len(buff) + transferred += len(buff) if callable(callback): - callback(transfered, self.size) + callback(transferred, self.size) self.conn.put_end() except socket.timeout, err: diff --git a/test/unit/common/test_manager.py b/test/unit/common/test_manager.py index 2c70516c7a..8cbb63aced 100644 --- a/test/unit/common/test_manager.py +++ b/test/unit/common/test_manager.py @@ -611,7 +611,7 @@ class TestServer(unittest.TestCase): self.assertEquals(len(running_pids), 1) self.assert_(1 in running_pids) self.assert_(2 not in running_pids) - # test persistant running pid files + # test persistent running pid files self.assert_(os.path.exists(os.path.join(t, 'test-server1.pid'))) # test clean up stale pids pid_two = self.join_swift_dir('test-server2.pid') diff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py index ce166e7db6..769e1ca6ed 100644 --- a/test/unit/common/test_utils.py +++ b/test/unit/common/test_utils.py @@ -302,7 +302,7 @@ class TestUtils(unittest.TestCase): lfo.tell() def test_parse_options(self): - # use mkstemp to get a file that is definately on disk + # use mkstemp to get a file that is definitely on disk with NamedTemporaryFile() as f: conf_file = f.name conf, options = utils.parse_options(test_args=[conf_file]) diff --git a/test/unit/container/test_sync.py b/test/unit/container/test_sync.py index 10173d5d1b..08ee48bf5d 100644 --- a/test/unit/container/test_sync.py +++ b/test/unit/container/test_sync.py @@ -154,7 +154,7 @@ class TestContainerSync(unittest.TestCase): def test_run_once(self): # This runs runs_once with fakes twice, the first causing an interim - # report, the second with no interm report. + # report, the second with no interim report. time_calls = [0] audit_location_generator_calls = [0] diff --git a/test/unit/obj/test_replicator.py b/test/unit/obj/test_replicator.py index 306594ced9..4924ad32a7 100644 --- a/test/unit/obj/test_replicator.py +++ b/test/unit/obj/test_replicator.py @@ -373,7 +373,7 @@ class TestObjectReplicator(unittest.TestCase): whole_path_from = os.path.join(self.objects, '0', data_dir) hashes_file = os.path.join(self.objects, '0', object_replicator.HASH_FILE) - # test that non existant file except caught + # test that non existent file except caught self.assertEquals(object_replicator.invalidate_hash(whole_path_from), None) # test that hashes get cleared diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py index c122f5fa25..62e4f1d16a 100755 --- a/test/unit/proxy/test_server.py +++ b/test/unit/proxy/test_server.py @@ -1462,7 +1462,7 @@ class TestObjectController(unittest.TestCase): limit = MAX_META_OVERALL_SIZE controller = proxy_server.ObjectController(self.app, 'account', 'container', 'object') - count = limit / 256 # enough to cause the limit to be reched + count = limit / 256 # enough to cause the limit to be reached headers = dict( (('X-Object-Meta-' + str(i), 'a' * 256) for i in xrange(count + 1)))