Skip to content

Commit

Permalink
tor: don't pre-mkdir the statedir, let txtorcon do that
Browse files Browse the repository at this point in the history
txtorcon-0.15.0 takes responsibility for this (see
meejah/txtorcon#176), but I'm not sure it does
it correctly yet.
  • Loading branch information
warner committed Jul 29, 2016
1 parent ff9777f commit e270940
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/foolscap/connections/tor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os, re
import re
from twisted.internet.interfaces import IStreamClientEndpoint
from twisted.internet.defer import inlineCallbacks, returnValue, succeed
import ipaddress
Expand Down Expand Up @@ -105,12 +105,6 @@ def _connect(self, reactor):
# want it to be persistent. This saves some startup time, because
# we cache the descriptors from last time. On one of my hosts,
# this reduces connect from 20s to 15s.
if not os.path.exists(self._data_directory):
# tor will mkdir this, but txtorcon wants to chdir to it
# before spawning the tor process, so (for now) we need to
# mkdir it ourselves. TODO: txtorcon should take
# responsibility for this.
os.mkdir(self._data_directory)
config.DataDirectory = self._data_directory

#config.ControlPort = allocate_tcp_port() # defaults to 9052
Expand Down

0 comments on commit e270940

Please sign in to comment.