mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 00:39:37 -05:00
Catch exceptions for guessing default Tor Browser socket file path
This commit is contained in:
parent
d069cc2a29
commit
f14b5ebfa1
@ -135,11 +135,14 @@ class Onion(object):
|
|||||||
# If this still didn't work, try guessing the default socket file path
|
# If this still didn't work, try guessing the default socket file path
|
||||||
socket_file_path = ''
|
socket_file_path = ''
|
||||||
if not found_tor:
|
if not found_tor:
|
||||||
|
try:
|
||||||
if p == 'Darwin':
|
if p == 'Darwin':
|
||||||
socket_file_path = os.path.expanduser('~/Library/Application Support/TorBrowser-Data/Tor/control.socket')
|
socket_file_path = os.path.expanduser('~/Library/Application Support/TorBrowser-Data/Tor/control.socket')
|
||||||
|
|
||||||
self.c = Controller.from_socket_file(path=socket_file_path)
|
self.c = Controller.from_socket_file(path=socket_file_path)
|
||||||
found_tor = True
|
found_tor = True
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# If connecting to default control ports failed, so let's try
|
# If connecting to default control ports failed, so let's try
|
||||||
# guessing the socket file name next
|
# guessing the socket file name next
|
||||||
|
Loading…
Reference in New Issue
Block a user