Onionr/src/netcontroller/__init__.py

12 lines
248 B
Python
Raw Normal View History

2022-01-11 07:20:15 +00:00
from . import getopenport
import os
from shutil import which
def tor_binary():
"""Return tor binary path or none if not exists"""
tor_path = './tor'
if not os.path.exists(tor_path):
tor_path = which('tor')
return tor_path