commit 68434ca69f5a5b38fc877abf03064eddbe879956 Author: Isis Lovecruft <i...@torproject.org> Date: Mon Apr 20 03:45:24 2015 +0000
Remove unnecessary use of logSafely() in bridgedb.Bridges. Logging str(bridge) will produce a hashed fingerprint if safelogging is enabled, so there's no use in calling logSafely(bridge.fingerprint). --- lib/bridgedb/Bridges.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py index 1a06dd8..4b77cdc 100644 --- a/lib/bridgedb/Bridges.py +++ b/lib/bridgedb/Bridges.py @@ -539,14 +539,12 @@ class FilteredBridgeSplitter(object): """ # The bridge must be running to insert it: if not bridge.flags.running: - logging.warn( - "Skipping hashring insertion for non-running bridge: '%s'" - % logSafely(bridge.fingerprint)) + logging.warn(("Skipping hashring insertion for non-running " + "bridge: %s") % bridge) return index = 0 - logging.debug("Inserting %s into hashring" - % (logSafely(bridge.fingerprint))) + logging.debug("Inserting %s into hashring..." % bridge) for old_bridge in self.bridges[:]: if bridge.fingerprint == old_bridge.fingerprint: self.bridges[index] = bridge @@ -557,8 +555,8 @@ class FilteredBridgeSplitter(object): for ringname, (filterFn, subring) in self.filterRings.items(): if filterFn(bridge): subring.insert(bridge) - logging.debug("Inserted bridge '%s' into '%s' sub hashring" - % (logSafely(bridge.fingerprint), ringname)) + logging.debug("Inserted bridge %s into %s subhashring." % + (bridge, ringname)) def extractFilterNames(self, ringname): """Get the names of the filters applied to a particular sub hashring. _______________________________________________ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits