[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Deduplicating RelayEndReason vs StreamClosureReason
commit 33547a2b346b07f900d81be08f2dcd19451ea434
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sun Dec 9 14:33:21 2012 -0800
Deduplicating RelayEndReason vs StreamClosureReason
StreamClosureReason is a superset of RelayEndReason so there's no need to list
both. Merging the enum descriptions and having StreamClosureReason refer to
RelayEndReason.
Also added RelayEndReason to __all__ so wildcard imports will pick it up.
---
stem/__init__.py | 46 +++++++++++++++++-----------------------------
1 files changed, 17 insertions(+), 29 deletions(-)
diff --git a/stem/__init__.py b/stem/__init__.py
index 9dd0cb5..5d6d8fb 100644
--- a/stem/__init__.py
+++ b/stem/__init__.py
@@ -166,20 +166,20 @@ Library for working with the tor process.
=================== ===========
RelayEndReason Description
=================== ===========
- **MISC** catch-all for unlisted reasons
- **RESOLVEFAILED** couldn't look up hostname
- **CONNECTREFUSED** remote host refused connection
- **EXITPOLICY** OR refuses to connect to host or port
- **DESTROY** Circuit is being destroyed
- **DONE** Anonymized TCP connection was closed
- **TIMEOUT** Connection timed out, or OR timed out while connecting
- **NOROUTE** Routing error while attempting to contact destination
- **HIBERNATING** OR is temporarily hibernating
- **INTERNAL** Internal error at the OR
- **RESOURCELIMIT** OR has no resources to fulfill request
- **CONNRESET** Connection was unexpectedly reset
- **TORPROTOCOL** Sent when closing connection because of Tor protocol violations.
- **NOTDIRECTORY** Client sent RELAY_BEGIN_DIR to a non-directory relay.
+ **MISC** none of the following reasons
+ **RESOLVEFAILED** unable to resolve the hostname
+ **CONNECTREFUSED** remote host refused the connection
+ **EXITPOLICY** OR refuses to connect to the destination
+ **DESTROY** circuit is being shut down
+ **DONE** connection has been closed
+ **TIMEOUT** connection timed out
+ **NOROUTE** routing error while contacting the destination
+ **HIBERNATING** relay is temporarily hibernating
+ **INTERNAL** internal error at the relay
+ **RESOURCELIMIT** relay has insufficient resources to service the request
+ **CONNRESET** connection was unexpectedly reset
+ **TORPROTOCOL** violation in the tor protocol
+ **NOTDIRECTORY** directory information requested from a relay that isn't mirroring it
=================== ===========
.. data:: StreamStatus (enum)
@@ -203,26 +203,13 @@ Library for working with the tor process.
.. data:: StreamClosureReason (enum)
- Reason that a stream is being closed or failed to be established. Tor may
+ Reason that a stream is being closed or failed to be established. This
+ includes all values in the :data:`~stem.RelayEndReason` enumeration. Tor may
provide reasons not in this enum.
===================== ===========
StreamClosureReason Description
===================== ===========
- **MISC** none of the following reasons
- **RESOLVEFAILED** unable to resolve the hostname
- **CONNECTREFUSED** remote host refused the connection
- **EXITPOLICY** rejected by the exit due to its exit policy
- **DESTROY** circuit is being shut down
- **DONE** connection has been closed
- **TIMEOUT** connection timed out
- **NOROUTE** routing error while contacting the destination
- **HIBERNATING** relay is hibernating
- **INTERNAL** internal error
- **RESOURCELIMIT** relay has insufficient resources to service the request
- **CONNRESET** connection has been reset
- **TORPROTOCOL** violation in the tor protocol
- **NOTDIRECTORY** directory information requested from a relay that isn't mirroring it
**END** endpoint has sent a RELAY_END cell
**PRIVATE_ADDR** endpoint was a private address (127.0.0.1, 10.0.0.1, etc)
===================== ===========
@@ -393,6 +380,7 @@ __all__ = [
"CircClosureReason",
"CircEvent",
"HiddenServiceState",
+ "RelayEndReason",
"StreamStatus",
"StreamClosureReason",
"StreamSource",
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits