File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,7 +169,15 @@ def _run_update_initramfs(self):
169169 # Using 'env' rather than a shell assignment prefix because
170170 # _exec_cmd_chroot runs the command directly via chroot (no shell),
171171 # so "LC_ALL=C cmd" would be treated as the binary name.
172- raw = self ._exec_cmd_chroot ("env LC_ALL=C linux-version list" )
172+ try :
173+ raw = self ._exec_cmd_chroot ("env LC_ALL=C linux-version list" )
174+ except exception .SSHCommandNotFoundException as ex :
175+ # Container images such as the ones used by the integration tests
176+ # do not include the "linux-version" binary.
177+ LOG .warning (
178+ "Unable to enumerate kernel versions, skipping "
179+ "update-initramfs. Exception: %s" , ex )
180+ return
173181
174182 kernel_versions = [v for v in raw .splitlines () if v and v [0 ].isdigit ()]
175183 if not kernel_versions :
You can’t perform that action at this time.
0 commit comments