Skip to content

Commit

Permalink
python 2/3 compatibility change
Browse files Browse the repository at this point in the history
  • Loading branch information
brevans committed Jun 1, 2017
1 parent 7fa59ce commit 36db511
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dSQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#get slurm info
try:
#get max configured array index
slurm_conf = check_output(['scontrol', 'show', 'conf']).split('\n')[:-1]
slurm_conf = check_output(['scontrol', 'show', 'conf'], universal_newlines=True).split('\n')[:-1]
MaxArraySize = [int(x.split('=')[1]) for x in slurm_conf if x.startswith('MaxArraySize')][0]

#get unique list of partitions, maintaining order
partitions_nu = [x.split()[0] for x in check_output(['sinfo', '-h']).split('\n')[:-1]]
partitions_nu = [x.split()[0] for x in check_output(['sinfo', '-h'], universal_newlines=True).split('\n')[:-1]]
parts = set()
partitions = [x for x in partitions_nu if x not in parts and not parts.add(x)]

Expand Down

0 comments on commit 36db511

Please sign in to comment.