mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Make scripts compatible with Python3.5
This commit is contained in:
parent
86557443a2
commit
efaa2fb38b
@ -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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user