From 6d7de3707e14416a8d2ecc0d9bb3160fdb2c3906 Mon Sep 17 00:00:00 2001 From: Chi Song Date: Thu, 2 Nov 2023 15:35:34 -0700 Subject: [PATCH] wsl: fix hard code path --- lisa/tools/wsl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisa/tools/wsl.py b/lisa/tools/wsl.py index 985139e627..2eedf52672 100644 --- a/lisa/tools/wsl.py +++ b/lisa/tools/wsl.py @@ -1,7 +1,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT license. -import os import re import time from pathlib import PurePath @@ -312,7 +311,7 @@ def _config( def _config_kernel(self, kernel: str) -> str: self._log.debug(f"Detecting kernel from {kernel}") - if not os.path.exists(kernel): + if not self.node.shell.exists(PurePath(kernel)): raise LisaException(f"Kernel file {kernel} doesn't exist.") if kernel.endswith(".tar.xz"):