Fix logic
This commit is contained in:
parent
43694ca97d
commit
05baceb388
11
run.py
11
run.py
@ -1121,6 +1121,8 @@ def setup_client(pool):
|
||||
fprint("Running full jukebox control system...")
|
||||
jb = subprocess.Popen("ssh root@192.168.1.25 -t -- /root/jukebox-software/run.sh".split(' '), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, universal_newlines=True)
|
||||
while True:
|
||||
if jb.poll() is not None:
|
||||
break
|
||||
line = jb.stdout.readline() # Alternatively proc.stdout.read(1024)
|
||||
if len(line) == 0: # program end
|
||||
break
|
||||
@ -1142,15 +1144,22 @@ def setup_client(pool):
|
||||
|
||||
firefox.get('http://192.168.1.25:3000')
|
||||
global kill_ssh
|
||||
for line in jb.stdout:
|
||||
while True:
|
||||
if jb.poll() is not None:
|
||||
break
|
||||
line = jb.stdout.readline() # Alternatively proc.stdout.read(1024)
|
||||
if len(line) == 0: # program end
|
||||
break
|
||||
print(line, end='')
|
||||
if kill_ssh is True:
|
||||
break
|
||||
|
||||
|
||||
firefox.close()
|
||||
|
||||
jb.terminate()
|
||||
#run_cmd("Stop-VM -Name Jukebox*")
|
||||
sleep(2)
|
||||
killall()
|
||||
|
||||
#firefox.execute_script('document.body.style.MozTransform = "scale(0.80)";')
|
||||
|
Loading…
x
Reference in New Issue
Block a user