Skip to content

Commit b42e8bd

Browse files
committed
Merge branch 'adrien_slurm' of github.com:aalitaiga/smartdispatch into adrien_slurm
2 parents 5bd3c86 + bd104b0 commit b42e8bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

smartdispatch/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ def detect_cluster():
135135
def get_slurm_cluster_name():
136136
try:
137137
stdout = Popen("sacctmgr list cluster", stdout=PIPE, shell=True).communicate()[0]
138+
stdout = stdout.decode()
139+
cluster_name = stdout.splitlines()[2].strip().split(' ')[0]
138140
except OSError:
139141
return None
140-
stdout = stdout.decode()
141-
cluster_name = stdout.splitlines()[2].strip().split(' ')[0]
142142
return cluster_name
143143

144144
def get_launcher(cluster_name):

0 commit comments

Comments
 (0)