Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ImportError to catch GitPython import error #1186

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/datumaro/util/os_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Check warning on line 24 in src/datumaro/util/os_util.py

View check run for this annotation

Codecov / codecov/patch

src/datumaro/util/os_util.py#L24

Added line #L24 was not covered by tests
from os import remove as rmfile # noqa: F401
from shutil import rmtree as rmtree # noqa: F401

Expand Down
Loading