From 97295e8ef2e164f078000cfedf4d53fd01c136ce Mon Sep 17 00:00:00 2001 From: "Kim, Vinnam" Date: Wed, 25 Oct 2023 23:05:35 +0900 Subject: [PATCH] Add ImportError to catch GitPython import error Signed-off-by: Kim, Vinnam --- src/datumaro/util/os_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datumaro/util/os_util.py b/src/datumaro/util/os_util.py index c93ed23a2d..2c8f1e856e 100644 --- a/src/datumaro/util/os_util.py +++ b/src/datumaro/util/os_util.py @@ -21,7 +21,7 @@ # readonly files on Windows, which Git uses extensively # It double checks if a file cannot be removed because of readonly flag from git.util import rmfile, rmtree # noqa: F401 -except ModuleNotFoundError: +except (ModuleNotFoundError, ImportError): from os import remove as rmfile # noqa: F401 from shutil import rmtree as rmtree # noqa: F401