[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Squashed all my spelling changes into one commit
commit 2a597415c0a8ca8203ee0282103ef0c606f1d887
Author: Eoin o Fearghail <eoin.o.fearghail@xxxxxxxxx>
Date: Mon Nov 5 22:54:02 2012 +0000
Squashed all my spelling changes into one commit
---
stem/connection.py | 5 ++---
stem/control.py | 6 +++---
stem/descriptor/extrainfo_descriptor.py | 4 ++--
stem/descriptor/networkstatus.py | 4 ++--
stem/descriptor/reader.py | 4 ++--
stem/descriptor/router_status_entry.py | 2 +-
stem/descriptor/server_descriptor.py | 6 +++---
stem/response/__init__.py | 8 ++++----
stem/response/getconf.py | 2 +-
stem/util/conf.py | 4 ++--
stem/util/enum.py | 2 +-
stem/util/system.py | 2 +-
test/prompt.py | 2 +-
test/unit/descriptor/server_descriptor.py | 2 +-
14 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/stem/connection.py b/stem/connection.py
index fa41c67..6264be4 100644
--- a/stem/connection.py
+++ b/stem/connection.py
@@ -4,7 +4,7 @@ Functions for connecting and authenticating to the tor process.
The :func:`~stem.connection.connect_port` and
:func:`~stem.connection.connect_socket_file` functions give an easy, one line
method for getting an authenticated control connection. This is handy for CLI
-applications and the python interactive interpretor, but does several things
+applications and the python interactive interpreter, but does several things
that makes it undesirable for applications (uses stdin/stdout, suppresses
exceptions, etc).
@@ -489,8 +489,7 @@ def authenticate_password(controller, password, suppress_ctl_errors = True):
except: pass
# all we have to go on is the error message from tor...
- # Password did not match HashedControlPassword value value from configuration...
- # Password did not match HashedControlPassword *or*...
+ # ...Password did not match HashedControlPassword.
if "Password did not match HashedControlPassword" in str(auth_response):
raise IncorrectPassword(str(auth_response), auth_response)
diff --git a/stem/control.py b/stem/control.py
index af5c8ee..02afa33 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -79,7 +79,7 @@ State = stem.util.enum.Enum("INIT", "RESET", "CLOSED")
UNDEFINED = "<Undefined_ >"
# Configuration options that are fetched by a special key. The keys are
-# lowercase to make case insensetive lookups easier.
+# lowercase to make case insensitive lookups easier.
MAPPED_CONFIG_KEYS = {
"hiddenservicedir": "HiddenServiceOptions",
@@ -107,9 +107,9 @@ CACHEABLE_GETINFO_PARAMS = (
# is unavailable
GEOIP_FAILURE_THRESHOLD = 5
-# TODO: The Thread's isAlive() method and theading's currentThread() was
+# TODO: The Thread's isAlive() method and threading's currentThread() was
# changed to the more conventional is_alive() and current_thread() in python
-# 2.6 and above. We should use that when dropping python 2.5 compatability.
+# 2.6 and above. We should use that when dropping python 2.5 compatibility.
class BaseController(object):
"""
diff --git a/stem/descriptor/extrainfo_descriptor.py b/stem/descriptor/extrainfo_descriptor.py
index 2bf76e3..76adfbf 100644
--- a/stem/descriptor/extrainfo_descriptor.py
+++ b/stem/descriptor/extrainfo_descriptor.py
@@ -280,7 +280,7 @@ class ExtraInfoDescriptor(stem.descriptor.Descriptor):
def __init__(self, raw_contents, validate = True):
"""
Extra-info descriptor constructor. By default this validates the
- descriptor's content as it's parsed. This validation can be disables to
+ descriptor's content as it's parsed. This validation can be disabled to
either improve performance or be accepting of malformed data.
:param str raw_contents: extra-info content provided by the relay
@@ -419,7 +419,7 @@ class ExtraInfoDescriptor(stem.descriptor.Descriptor):
if not stem.util.tor_tools.is_valid_nickname(extra_info_comp[0]):
raise ValueError("Extra-info line entry isn't a valid nickname: %s" % extra_info_comp[0])
elif not stem.util.tor_tools.is_valid_fingerprint(extra_info_comp[1]):
- raise ValueError("Tor relay fingerprints consist of fourty hex digits: %s" % extra_info_comp[1])
+ raise ValueError("Tor relay fingerprints consist of forty hex digits: %s" % extra_info_comp[1])
self.nickname = extra_info_comp[0]
self.fingerprint = extra_info_comp[1]
diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index 893129b..5649d53 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -14,8 +14,8 @@ dir-spec. Documents can be obtained from a few sources...
* document footer
Of these, the router status entry section can be quite large (on the order of
-hundreds of kilobytes). As such we provide a couple methods of reading network
-status documents...
+hundreds of kilobytes). As such we provide a couple of methods for reading
+network status documents...
* :class:`stem.descriptor.networkstatus.NetworkStatusDocumentV3` constructor
diff --git a/stem/descriptor/reader.py b/stem/descriptor/reader.py
index c03b996..5ded34d 100644
--- a/stem/descriptor/reader.py
+++ b/stem/descriptor/reader.py
@@ -35,7 +35,7 @@ and picks up where it left off if ran again...
try:
processed_files = load_processed_files("/tmp/used_descriptors")
reader.set_processed_files(processed_files)
- except: pass # could not load, mabye this is the first run
+ except: pass # could not load, maybe this is the first run
start_time = time.time()
@@ -89,7 +89,7 @@ FINISHED = "DONE"
# TODO: The threading.Event's isSet() method was changed to the more
# conventional is_set() in python 2.6 and above. We should use that when
-# dropping python 2.5 compatability...
+# dropping python 2.5 compatibility...
# http://docs.python.org/library/threading.html#threading.Event.is_set
class FileSkipped(Exception):
diff --git a/stem/descriptor/router_status_entry.py b/stem/descriptor/router_status_entry.py
index 95f955b..239e6bb 100644
--- a/stem/descriptor/router_status_entry.py
+++ b/stem/descriptor/router_status_entry.py
@@ -29,7 +29,7 @@ def parse_file(document_file, validate, entry_class, entry_keyword = "r", start_
first line (entry_keyword). When finished the document is left at the
end_position.
- Either a end_position or section_end_keywords must be provided.
+ Either an end_position or section_end_keywords must be provided.
:param file document_file: file with network status document content
:param bool validate: checks the validity of the document's contents if
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index f8cdb00..68b2da3 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -400,7 +400,7 @@ class ServerDescriptor(stem.descriptor.Descriptor):
if validate:
raise ValueError("Published line's time wasn't parseable: %s" % line)
elif keyword == "fingerprint":
- # This is fourty hex digits split into space separated groups of four.
+ # This is forty hex digits split into space separated groups of four.
# Checking that we match this pattern.
fingerprint = value.replace(" ", "")
@@ -426,11 +426,11 @@ class ServerDescriptor(stem.descriptor.Descriptor):
elif keyword == "caches-extra-info":
self.extra_info_cache = True
elif keyword == "extra-info-digest":
- # this is fourty hex digits which just so happens to be the same a
+ # this is forty hex digits which just so happens to be the same a
# fingerprint
if validate and not stem.util.tor_tools.is_valid_fingerprint(value):
- raise ValueError("Extra-info digests should consist of fourty hex digits: %s" % value)
+ raise ValueError("Extra-info digests should consist of forty hex digits: %s" % value)
self.extra_info_digest = value
elif keyword == "hidden-service-dir":
diff --git a/stem/response/__init__.py b/stem/response/__init__.py
index bd73f85..fb6c63f 100644
--- a/stem/response/__init__.py
+++ b/stem/response/__init__.py
@@ -266,7 +266,7 @@ class ControlLine(str):
:returns: **True** if the next entry can be parsed as a quoted value, **False** otherwise
"""
- start_quote, end_quote = _get_quote_indeces(self._remainder, escaped)
+ start_quote, end_quote = _get_quote_indices(self._remainder, escaped)
return start_quote == 0 and end_quote != -1
def is_next_mapping(self, key = None, quoted = False, escaped = False):
@@ -290,7 +290,7 @@ class ControlLine(str):
if quoted:
# checks that we have a quoted value and that it comes after the 'key='
- start_quote, end_quote = _get_quote_indeces(remainder, escaped)
+ start_quote, end_quote = _get_quote_indices(remainder, escaped)
return start_quote == key_match.end() and end_quote != -1
else:
return True # we just needed to check for the key
@@ -399,7 +399,7 @@ def _parse_entry(line, quoted, escaped):
if quoted:
# validate and parse the quoted value
- start_quote, end_quote = _get_quote_indeces(remainder, escaped)
+ start_quote, end_quote = _get_quote_indices(remainder, escaped)
if start_quote != 0 or end_quote == -1:
raise ValueError("the next entry isn't a quoted value: " + line)
@@ -416,7 +416,7 @@ def _parse_entry(line, quoted, escaped):
return (next_entry, remainder.lstrip())
-def _get_quote_indeces(line, escaped):
+def _get_quote_indices(line, escaped):
"""
Provides the indices of the next two quotes in the given content.
diff --git a/stem/response/getconf.py b/stem/response/getconf.py
index 72bfc34..6d396b8 100644
--- a/stem/response/getconf.py
+++ b/stem/response/getconf.py
@@ -42,7 +42,7 @@ class GetConfResponse(stem.response.ControlMessage):
if line.is_next_mapping(quoted = False):
key, value = line.split("=", 1) # TODO: make this part of the ControlLine?
elif line.is_next_mapping(quoted = True):
- # TODO: doesn't seem to occure yet in practice...
+ # TODO: doesn't seem to occur yet in practice...
# https://trac.torproject.org/6172
key, value = line.pop_mapping(True).items()[0]
diff --git a/stem/util/conf.py b/stem/util/conf.py
index 9c15973..cc80cb8 100644
--- a/stem/util/conf.py
+++ b/stem/util/conf.py
@@ -16,7 +16,7 @@ For instance...
# This is my sample config
user.name Galen
user.password yabba1234 # here's an inline comment
- user.notes takes a fancy to pepperjack chese
+ user.notes takes a fancy to pepperjack cheese
blankEntry.example
msg.greeting
@@ -30,7 +30,7 @@ For instance...
config = {
"user.name": "Galen",
"user.password": "yabba1234",
- "user.notes": "takes a fancy to pepperjack chese",
+ "user.notes": "takes a fancy to pepperjack cheese",
"blankEntry.example": "",
"msg.greeting": "Multi-line message exclaiming of the\\nwonder and awe that is pepperjack!",
}
diff --git a/stem/util/enum.py b/stem/util/enum.py
index 42ca7ea..f120e5c 100644
--- a/stem/util/enum.py
+++ b/stem/util/enum.py
@@ -30,7 +30,7 @@ constructed as simple type listings...
Enum - Provides a basic, ordered enumeration
|- keys - string representation of our enum keys
- |- index_of - indice of an enum value
+ |- index_of - index of an enum value
|- next - provides the enum after a given enum value
|- previous - provides the enum before a given value
|- __getitem__ - provides the value for an enum key
diff --git a/stem/util/system.py b/stem/util/system.py
index 85c8faf..2b8eb14 100644
--- a/stem/util/system.py
+++ b/stem/util/system.py
@@ -415,7 +415,7 @@ def get_pid_by_open_file(path):
def get_cwd(pid):
"""
- Provices the working directory of the given process.
+ Provides the working directory of the given process.
:param int pid: process id of the process to be queried
:returns: **str** with the absolute path for the process' present working
diff --git a/test/prompt.py b/test/prompt.py
index 91ad6d3..290cd6e 100644
--- a/test/prompt.py
+++ b/test/prompt.py
@@ -1,5 +1,5 @@
"""
-Simple helper methods to make troubleshooting with the python interpretor
+Simple helper methods to make troubleshooting with the python interpreter
easier.
::
diff --git a/test/unit/descriptor/server_descriptor.py b/test/unit/descriptor/server_descriptor.py
index 39be157..fc81851 100644
--- a/test/unit/descriptor/server_descriptor.py
+++ b/test/unit/descriptor/server_descriptor.py
@@ -161,7 +161,7 @@ class TestServerDescriptor(unittest.TestCase):
def test_read_and_write_history(self):
"""
- Parses a read-history and write-history entry. This is now a depricated
+ Parses a read-history and write-history entry. This is now a deprecated
field for relay server descriptors but is still found in archives and
extra-info descriptors.
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits