We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc1ed14 commit 02d9bb2Copy full SHA for 02d9bb2
1 file changed
rootfs/scheduler/__init__.py
@@ -1393,7 +1393,12 @@ def _pod_pending_status(self, pod):
1393
1394
if reason == 'ContainerCreating':
1395
# get the last event
1396
- event = self._pod_events(pod).pop()
+ events = self._pod_events(pod)
1397
+ if not events:
1398
+ # could not find any events
1399
+ return reason, message
1400
+
1401
+ event = events.pop()
1402
return event['reason'], event['message']
1403
1404
return reason, message
0 commit comments