Fix get-tor.py to only add built-in bridges if the bridge type exists

This commit is contained in:
Micah Lee 2022-09-30 09:32:08 -07:00
parent 2112f9a5fb
commit a1e372411f
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -312,6 +312,7 @@ def update_tor_bridges():
return False
result = r.json()
print(f"Built-in bridges: {result}")
if "errors" in result:
print(
@ -320,7 +321,7 @@ def update_tor_bridges():
return False
for bridge_type in ["meek-azure", "obfs4", "snowflake"]:
if result[bridge_type]:
if bridge_type in result and result[bridge_type]:
if bridge_type == "meek-azure":
torrc_template_extension = "meek_lite_azure"
else: