Skip to content

Commit 7a2c33a

Browse files
author
Nils Bars
committed
Handle None return from Docker network.containers property
Add defensive None check in InstanceManager.is_running() before checking container membership in the network's container list. The Docker SDK can return None from network.containers after reload() under certain race conditions.
1 parent b488f1d commit 7a2c33a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

webapp/ref/core/instance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ def is_running(self):
781781
# i.e., docker-compose down -> docker-compose up
782782
ssh_to_entry_network.reload()
783783
containers = ssh_to_entry_network.containers
784-
if ssh_proxy_container not in containers:
784+
if containers is None or ssh_proxy_container not in containers:
785785
return False
786786
if web_container not in containers:
787787
return False

0 commit comments

Comments
 (0)