Skip to content

Commit

Permalink
Read last line from wilson stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Jul 1, 2024
1 parent d8e1ffb commit 058ee84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xce/lib/cluster/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def get_token(fetch_password, error=None):
stdin, stdout, stderr = ssh.exec_command("scontrol token lifespan=3600")
if stdout.channel.recv_exit_status() != 0:
return get_token(fetch_password, error="Token Acquisition Failed")
TOKEN = stdout.next().split("=")[1].strip()
final_line = stdout.next()
for final_line in stdout:
continue
TOKEN = final_line.split("=")[1].strip()
TOKEN_EXPIRY = time.clock() + 3600
return TOKEN

Expand Down

0 comments on commit 058ee84

Please sign in to comment.