[tor-commits] [bridgedb/master] Return the port if it passes addr.PortList._sanitycheck().

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:33 UTC 2014


commit b362ce61762dd3c32b801aa69b58b1521db0a82e
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sat Dec 7 04:39:07 2013 +0000

    Return the port if it passes addr.PortList._sanitycheck().
    
    This ensures that the return value has truthiness.
---
 lib/bridgedb/parse/addr.py |    1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bridgedb/parse/addr.py b/lib/bridgedb/parse/addr.py
index d0137d9..3d8c9b9 100644
--- a/lib/bridgedb/parse/addr.py
+++ b/lib/bridgedb/parse/addr.py
@@ -309,6 +309,7 @@ class PortList(object):
         """
         if (not isinstance(port, int)) or not (0 < port <= 65535):
             raise InvalidPort("%s is not a valid port number!" % port)
+        return port
 
     def __contains__(self, port):
         """Determine whether ``port`` is already in this ``PortList``.





More information about the tor-commits mailing list