Commit 7f27aeb9 authored by Mark Hymers's avatar Mark Hymers

Explicily use /usr/sbin to avoid PATH issues and check status output

Signed-off-by: Mark Hymers's avatarMark Hymers <mark.hymers@ynic.york.ac.uk>
parent df42b9eb
......@@ -26,7 +26,11 @@ session_fields = ["agent_pid",
"sshfs_port"]
# Get session data
stdoutdata = subprocess.getoutput("x2golistsessions_root")
status, stdoutdata = subprocess.getstatusoutput("/usr/sbin/x2golistsessions_root")
if status != 0:
print("Error running x2golistsessions_root")
sys.exit(1)
for sessions in stdoutdata.splitlines():
# Collect session data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment