From 9745f2d2564f5557294c12a7036218bf2b6d5ded Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Tue, 3 May 2022 20:12:53 -0700 Subject: [PATCH] Fixing for tests. --- app/request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/request.py b/app/request.py index f6f62bf..03c5958 100644 --- a/app/request.py +++ b/app/request.py @@ -53,12 +53,12 @@ def send_tor_signal(signal: Signal) -> bool: # If password doesn't work try with cookie. try: with Controller.from_port(port=9051) as c: - authenticate_cookie(c, cookie_path="/var/lib/tor/control_auth_cookie") + cookie_path="/var/lib/tor/control_auth_cookie" + authenticate_cookie(c, cookie_path=cookie_path) c.signal(signal) os.environ['TOR_AVAILABLE'] = '1' except (SocketError, ConnectionRefusedError, ConnectionError): os.environ['TOR_AVAILABLE'] = '0' - print("Authentication with control port failed. Tor will be unavailable.") return False