mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 03:37:28 -03:00
Don't print Bridge lines in torrc for blank lines
This commit is contained in:
parent
1f5dcd1689
commit
3aa7902695
1 changed files with 4 additions and 2 deletions
|
@ -337,14 +337,16 @@ class Onion(object):
|
|||
for line in self.settings.get("tor_bridges_use_moat_bridges").split(
|
||||
"\n"
|
||||
):
|
||||
f.write(f"Bridge {line}\n")
|
||||
if line.strip() != "":
|
||||
f.write(f"Bridge {line}\n")
|
||||
f.write("\nUseBridges 1\n")
|
||||
|
||||
elif self.settings.get("tor_bridges_use_custom_bridges"):
|
||||
for line in self.settings.get(
|
||||
"tor_bridges_use_custom_bridges"
|
||||
).split("\n"):
|
||||
f.write(f"Bridge {line}\n")
|
||||
if line.strip() != "":
|
||||
f.write(f"Bridge {line}\n")
|
||||
f.write("\nUseBridges 1\n")
|
||||
|
||||
# Execute a tor subprocess
|
||||
|
|
Loading…
Reference in a new issue