[tor-commits] [bridgedb/master] PEP8ification of BridgeRingParameters.__init__().

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


commit c54905d2ef749f02adc9d3140b137d5b8418079e
Author: Isis Lovecruft <isis at torproject.org>
Date:   Fri Nov 15 13:22:39 2013 +0000

    PEP8ification of BridgeRingParameters.__init__().
---
 lib/bridgedb/Bridges.py |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index 97c93f6..8e28e7b 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -684,18 +684,18 @@ class BridgeRingParameters(object):
         """
         for port, count in needPorts:
             if not (1 <= port <= 65535):
-                raise TypeError("Port %s out of range."%port)
+                raise TypeError("Port %s out of range." % port)
             if count <= 0:
-                raise TypeError("Count %s out of range."%count)
+                raise TypeError("Count %s out of range." % count)
         for flag, count in needFlags:
             flag = flag.lower()
-            if flag not in [ "stable" ]:
-                raise TypeError("Unsupported flag %s"%flag)
+            if flag not in ["stable",]:
+                raise TypeError("Unsupported flag %s" % flag)
             if count <= 0:
-                raise TypeError("Count %s out of range."%count)
+                raise TypeError("Count %s out of range." % count)
 
         self.needPorts = needPorts[:]
-        self.needFlags = [(flag.lower(),count) for flag, count in needFlags[:] ]
+        self.needFlags = [(flag.lower(), count) for flag, count in needFlags[:]]
 
 class BridgeRing(BridgeHolder):
     """Arranges bridges in a ring based on an hmac function."""





More information about the tor-commits mailing list