Include stderr
This commit is contained in:
parent
c89fc86812
commit
419498cae6
12
run.py
12
run.py
@ -1118,15 +1118,16 @@ def setup_client(pool):
|
|||||||
|
|
||||||
fprint("VM online.")
|
fprint("VM online.")
|
||||||
# Windows client setup
|
# Windows client setup
|
||||||
from subprocess import PIPE
|
|
||||||
fprint("Running full jukebox control system...")
|
fprint("Running full jukebox control system...")
|
||||||
jb = subprocess.Popen("ssh root@192.168.1.25 -- /root/jukebox-software/run.sh".split(' '), stdout=PIPE, stderr=PIPE, bufsize=1, universal_newlines=True)
|
jb = subprocess.Popen("ssh root@192.168.1.25 -- /root/jukebox-software/run.sh".split(' '), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, universal_newlines=True)
|
||||||
for line in jb.stdout:
|
for line in jb.stdout:
|
||||||
print(line, end='')
|
print(line, end='')
|
||||||
if line.find("Running mode: Idle") > 0:
|
if line.find("Running mode: Idle") > 0:
|
||||||
# Jukebox started
|
# Jukebox started
|
||||||
break # continue with program
|
break # continue with program
|
||||||
|
|
||||||
|
if jb.poll() is None:
|
||||||
|
|
||||||
fprint("Opening browser...")
|
fprint("Opening browser...")
|
||||||
|
|
||||||
firefox = webdriver.Firefox()
|
firefox = webdriver.Firefox()
|
||||||
@ -1143,9 +1144,10 @@ def setup_client(pool):
|
|||||||
if kill_ssh is True:
|
if kill_ssh is True:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
firefox.close()
|
firefox.close()
|
||||||
jb.terminate()
|
jb.terminate()
|
||||||
run_cmd("Stop-VM -Name Jukebox*")
|
#run_cmd("Stop-VM -Name Jukebox*")
|
||||||
killall()
|
killall()
|
||||||
|
|
||||||
#firefox.execute_script('document.body.style.MozTransform = "scale(0.80)";')
|
#firefox.execute_script('document.body.style.MozTransform = "scale(0.80)";')
|
||||||
@ -1198,8 +1200,8 @@ def killall():
|
|||||||
|
|
||||||
def killall_signal(a, b):
|
def killall_signal(a, b):
|
||||||
global config
|
global config
|
||||||
if config["core"]["server"] == "Hyper-V":
|
#if config["core"]["server"] == "Hyper-V":
|
||||||
run_cmd("Stop-VM -Name Jukebox*") # any and all VMs starting with "Jukebox"
|
#run_cmd("Stop-VM -Name Jukebox*") # any and all VMs starting with "Jukebox"
|
||||||
if config["core"]["mode"] == "winclient":
|
if config["core"]["mode"] == "winclient":
|
||||||
global kill_ssh
|
global kill_ssh
|
||||||
kill_ssh = True
|
kill_ssh = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user