[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Revisions for STREAM_BW support



commit fb03666ebe9fa1ec134e6260bb79b6ed363e9994
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Dec 3 19:22:55 2012 -0800

    Revisions for STREAM_BW support
    
    Couple very minor tweaks to the prior commits:
    
    * Adding STREAM_BW to the Event enum table.
    
    * Chaning is_valid_stream_id() to be a function rather than a module alias.
      This is effectively the same thing, but is less likely to confuse sphinx and
      imho is a bit more intuitive.
---
 stem/control.py        |    1 +
 stem/util/tor_tools.py |    8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/stem/control.py b/stem/control.py
index c20db12..859cc16 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -100,6 +100,7 @@ providing its own for interacting at a higher level.
   **STATUS_GENERAL**    :class:`stem.response.events.StatusEvent`
   **STATUS_SERVER**     :class:`stem.response.events.StatusEvent`
   **STREAM**            :class:`stem.response.events.StreamEvent`
+  **STREAM_BW**         :class:`stem.response.events.StreamBwEvent`
   **WARN**              :class:`stem.response.events.LogEvent`
   ===================== ===========
 """
diff --git a/stem/util/tor_tools.py b/stem/util/tor_tools.py
index ea59092..c28bc64 100644
--- a/stem/util/tor_tools.py
+++ b/stem/util/tor_tools.py
@@ -78,13 +78,15 @@ def is_valid_circuit_id(entry):
   
   return bool(CIRC_ID_PATTERN.match(entry))
 
-is_valid_stream_id = is_valid_circuit_id
-"""
+def is_valid_stream_id(entry):
+  """
   Checks if a string is a valid format for being a stream identifier.
   Currently, this is just an alias to :func:`~stem.util.tor_tools.is_valid_circuit_id`.
   
   :returns: **True** if the string could be a stream id, **False** otherwise
-"""
+  """
+  
+  return is_valid_circuit_id(entry)
 
 def is_hex_digits(entry, count):
   """

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits