mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-26 11:13:00 -03:00
Raise exception if the API didn't return bridges for a specific bridge type, or if the bridge type wasn't recognized
This commit is contained in:
parent
19072503a9
commit
f8dd9547cd
1 changed files with 10 additions and 0 deletions
|
@ -371,6 +371,16 @@ class Onion(object):
|
||||||
):
|
):
|
||||||
for line in builtin_bridges["snowflake"]:
|
for line in builtin_bridges["snowflake"]:
|
||||||
f.write(f"Bridge {line}\n")
|
f.write(f"Bridge {line}\n")
|
||||||
|
else:
|
||||||
|
# Either this is a weird bridge type saved to settings (how?)
|
||||||
|
# or there were no bridges for this bridge type returned from
|
||||||
|
# the API.
|
||||||
|
self.common.log(
|
||||||
|
"Onion",
|
||||||
|
"connect",
|
||||||
|
"Error getting built-in bridges for this bridge type via Meek",
|
||||||
|
)
|
||||||
|
raise TorErrorGettingBridges()
|
||||||
else:
|
else:
|
||||||
self.common.log(
|
self.common.log(
|
||||||
"Onion",
|
"Onion",
|
||||||
|
|
Loading…
Add table
Reference in a new issue