Don't print Bridge lines in torrc for blank lines

This commit is contained in:
Micah Lee 2021-10-19 08:50:33 -07:00
parent 1f5dcd1689
commit 3aa7902695
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -337,6 +337,7 @@ class Onion(object):
for line in self.settings.get("tor_bridges_use_moat_bridges").split(
"\n"
):
if line.strip() != "":
f.write(f"Bridge {line}\n")
f.write("\nUseBridges 1\n")
@ -344,6 +345,7 @@ class Onion(object):
for line in self.settings.get(
"tor_bridges_use_custom_bridges"
).split("\n"):
if line.strip() != "":
f.write(f"Bridge {line}\n")
f.write("\nUseBridges 1\n")