Skip to content

Commit

Permalink
Add PySocks to requirements, tweak setup/tor slightly. Fixes #1806
Browse files Browse the repository at this point in the history
  • Loading branch information
BjarniRunar committed Jun 26, 2018
1 parent f89d4af commit 03ebb43
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
26 changes: 14 additions & 12 deletions mailpile/plugins/setup_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,11 +1224,13 @@ def autoconfig(cls, session):

def auto_configure_tor(self, session):
if session.config.tor_worker is not None:
hostport = ('127.0.0.1', session.config.tor_worker.socks_port)
success, message = self._configure_tor(session, hostport,
port_zero=True)
if success:
return message
if session.config.tor_worker.isReady(wait=True):
time.sleep(0.1)
hostport = ('127.0.0.1', session.config.tor_worker.socks_port)
success, message = self._configure_tor(session, hostport,
port_zero=True)
if success:
return message

if session.config.sys.tor.systemwide:
hostport = ('127.0.0.1', 9050)
Expand All @@ -1237,13 +1239,13 @@ def auto_configure_tor(self, session):
return message

if session.config.tor_worker is None:
session.config.start_tor_worker().isReady(wait=True)
hostport = ('127.0.0.1', session.config.tor_worker.socks_port)
time.sleep(0.2)
success, message = self._configure_tor(session, hostport,
port_zero=True)
if success:
session.config.sys.tor.systemwide = False
if session.config.start_tor_worker().isReady(wait=True):
time.sleep(0.1)
hostport = ('127.0.0.1', session.config.tor_worker.socks_port)
success, message = self._configure_tor(session, hostport,
port_zero=True)
if success:
session.config.sys.tor.systemwide = False

return message

Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ nose
mock>=1.0.1
pycrypto
pyDNS
PySocks
pgpdump
pillow
pbr
Expand Down
1 change: 1 addition & 0 deletions requirements-with-deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Jinja2
spambayes>=1.1b1
markupsafe
pyDNS
PySocks
pgpdump
pillow
pbr
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Jinja2
spambayes>=1.1b1
markupsafe
pyDNS
PySocks
pgpdump
pillow
pbr
Expand Down

0 comments on commit 03ebb43

Please sign in to comment.