Skip to content

Commit 5077b60

Browse files
committed
fix(scheduler): waiting state does not always have a message
Fixes #747
1 parent 32dc550 commit 5077b60

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

rootfs/scheduler/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,10 @@ def _pod_pending_status(self, pod):
14631463

14641464
if 'waiting' in container['state']:
14651465
reason = container['state']['waiting']['reason']
1466-
message = container['state']['waiting']['message']
1466+
message = ''
1467+
# message is not always available
1468+
if 'message' in container['state']['waiting']:
1469+
message = container['state']['waiting']['message']
14671470
if reason == 'ContainerCreating':
14681471
# get the last event
14691472
event = self._pod_events(pod).pop()

0 commit comments

Comments
 (0)