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

[tor-commits] [bridgedb/master] Remove unnecessary config parameter coercion.



commit 849b08a014c82deeaac67ef168c33ed51542ad2c
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Fri Nov 15 15:20:19 2013 +0000

    Remove unnecessary config parameter coercion.
    
    FORCE_PORTS and FORCE_FLAGS are already set to lists. We don't need to coerce
    them if they weren't set anymore.
---
 lib/bridgedb/Main.py |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py
index ad51631..7dfd41f 100644
--- a/lib/bridgedb/Main.py
+++ b/lib/bridgedb/Main.py
@@ -370,14 +370,11 @@ def startup(options, rundir, configFile):
     logging.debug("Created splitter: %r" % splitter)
 
     # Create ring parameters.
-    forcePorts = getattr(config, "FORCE_PORTS")
-    forceFlags = getattr(config, "FORCE_FLAGS")
-    if not forcePorts: forcePorts = []
-    if not forceFlags: forceFlags = []
-    ringParams=Bridges.BridgeRingParameters(needPorts=forcePorts,
-                                            needFlags=forceFlags)
+    ringParams = Bridges.BridgeRingParameters(needPorts=config.FORCE_PORTS,
+                                              needFlags=config.FORCE_FLAGS)
 
     emailDistributor = ipDistributor = None
+
     # As appropriate, create an IP-based distributor.
     if config.HTTPS_DIST and config.HTTPS_SHARE:
         logging.debug("Setting up HTTPS Distributor...")



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