test
This commit is contained in:
parent
54edfcc7a4
commit
4998c23185
@ -33,7 +33,13 @@ class plex_info():
|
|||||||
@property
|
@property
|
||||||
def token(self):
|
def token(self):
|
||||||
token_script = pathlib.Path(SCRIPT_DIR).joinpath('plex-token.sh')
|
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
|
return token
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user