Skip to content

Commit a149457

Browse files
committed
Fixing ImportError in some cases, bug #658
1 parent 9b047fe commit a149457

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pygit2/_run.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
from cffi import FFI
4040

4141
# Import from pygit2
42-
from _build import get_libgit2_paths
42+
try:
43+
from _build import get_libgit2_paths
44+
except ImportError:
45+
from ._build import get_libgit2_paths
4346

4447

4548
# C_HEADER_SRC

0 commit comments

Comments
 (0)