Skip to content

Commit

Permalink
don't fail on empty table
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Aug 5, 2024
1 parent d7cc3f0 commit 06dc58b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bfabric/scripts/bfabric_slurm_queue_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ def main() -> None:
args = parser.parse_args()
client = Bfabric.from_config()
zombie_jobs = find_zombie_jobs(client, partition=args.partition, ssh_host=args.ssh)
print(json.dumps(zombie_jobs["workunit_id"].to_list()))
if not zombie_jobs.is_empty():
if zombie_jobs.is_empty():
print(json.dumps([]))
else:
print(json.dumps(zombie_jobs["workunit_id"].to_list()))
sys.exit(1)


Expand Down

0 comments on commit 06dc58b

Please sign in to comment.