[bridgedb/master] Fix bug where open() was called even when COUNTY_BLOCK_FILE=None.

commit b659bbc75ad91979e0e182f28138dc8bb0b47a94 Author: Isis Lovecruft <isis@torproject.org> Date: Sun Jan 12 03:57:55 2014 +0000 Fix bug where open() was called even when COUNTY_BLOCK_FILE=None. --- lib/bridgedb/Bucket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bridgedb/Bucket.py b/lib/bridgedb/Bucket.py index a32adcd..6b8bf54 100644 --- a/lib/bridgedb/Bucket.py +++ b/lib/bridgedb/Bucket.py @@ -222,7 +222,7 @@ class BucketManager: # for a bridge, get the list of countries it might not work in blocklist = dict() - if hasattr(self.cfg, "COUNTRY_BLOCK_FILE"): + if getattr(self.cfg, "COUNTRY_BLOCK_FILE", None) is not None: f = open(self.cfg.COUNTRY_BLOCK_FILE, 'r') for ID,address,portlist,countries in bridgedb.Bridges.parseCountryBlockFile(f): blocklist[toHex(ID)] = countries
participants (1)
-
isis@torproject.org