Skip to content

Commit ca16c76

Browse files
fix: handle container_statuses being None (#52)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved reliability by preventing errors when container statuses are missing from pods during job checks. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent f3723ec commit ca16c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snakemake_executor_plugin_kubernetes/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ async def check_active_jobs(
448448
)
449449
)
450450
assert len(pods.items) <= 1
451-
if pods.items:
451+
if pods.items and pods.items[0].status.container_statuses is not None:
452452
pod = pods.items[0]
453453
snakemake_container = [
454454
container

0 commit comments

Comments
 (0)