Make scripts compatible with Python3.5

This commit is contained in:
Patrick 2019-06-28 17:45:33 +02:00
parent 86557443a2
commit efaa2fb38b

View File

@ -20,8 +20,8 @@ IMAGES = {
def manage_jobs(service): def manage_jobs(service):
# Get queued jobs # Get queued jobs
queued = json.load( queued = json.loads(
urllib.request.urlopen(VRE_MANAGER + "?service=" + service + "&status=queued") urllib.request.urlopen(VRE_MANAGER + "?service=" + service + "&status=queued").read().decode('utf-8')
) )
# Return if no jobs are available # Return if no jobs are available
@ -31,7 +31,6 @@ def manage_jobs(service):
# Get a list of compute nodes # Get a list of compute nodes
compute_nodes = subprocess.run( compute_nodes = subprocess.run(
["docker", "ps", "--filter", "ancestor=" + IMAGES[service], "--format", "{{.Names}}"], ["docker", "ps", "--filter", "ancestor=" + IMAGES[service], "--format", "{{.Names}}"],
encoding="utf-8",
stdout=subprocess.PIPE stdout=subprocess.PIPE
).stdout.split() ).stdout.split()