Unverified Commit b659bbc7 authored by Isis Lovecruft's avatar Isis Lovecruft
Browse files

Fix bug where open() was called even when COUNTY_BLOCK_FILE=None.

parent 87e44b44
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment