From 4998c231859db78b339b2639a1d0a3392dcb7cbc Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 21 Feb 2024 10:05:13 -0500 Subject: [PATCH] test --- remove_lonely_collections.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/remove_lonely_collections.py b/remove_lonely_collections.py index ef9c5f6..cccce12 100644 --- a/remove_lonely_collections.py +++ b/remove_lonely_collections.py @@ -33,7 +33,13 @@ class plex_info(): @property def token(self): token_script = pathlib.Path(SCRIPT_DIR).joinpath('plex-token.sh') - token = subprocess.run(['/bin/bash', token_script], capture_output=True, text=True).stdout + token_proc = subprocess.Popen(['/bin/bash', token_script], stdout=subprocess.PIPE) + token = token_proc.stdout.read().decode().strip("\n") + token_proc.terminate() + token_proc.communicate() + token_proc.kill() + + # token = subprocess.run(['/bin/bash', token_script], capture_output=True, text=True).stdout return token @property