diff --git a/oml/tor.py b/oml/tor.py index 98bc945..483c489 100644 --- a/oml/tor.py +++ b/oml/tor.py @@ -81,9 +81,10 @@ DirReqStatistics 0 env = None cmd = [tor, '--defaults-torrc', defaults, '-f', torrc, 'DataDirectory', tor_data] cmd += self.geoip(tor) + cwd = os.path.dirname(tor) while self.running: self.p = subprocess.Popen(cmd, stdout=subprocess.PIPE, bufsize=1, - universal_newlines=True, start_new_session=True, env=env) + universal_newlines=True, start_new_session=True, env=env, cwd=cwd) for line in self.p.stdout: self._status.append(line) logger.debug(line)