From 72288ea55f1b78a5a74e92dda734f76f457ec765 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 6 Jul 2022 09:31:11 -0600 Subject: [PATCH] Condense logic to strip tor password newlines --- app/request.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/request.py b/app/request.py index f4e8dcc..5bab1ac 100644 --- a/app/request.py +++ b/app/request.py @@ -56,9 +56,7 @@ def send_tor_signal(signal: Signal) -> bool: # Scan for the last line of the file. for line in conf: pass - secret = line - if '\n' in line: - secret = line.strip('\n') + secret = line.strip('\n') authenticate_password(c, password=secret) else: cookie_path = '/var/lib/tor/control_auth_cookie'