Commit 787e2d3
authored
Fix #2751.
If `__init__.py` does not exist, `module.__file__` is `None` (it is
expected to give the path to `__init__.py`). In this case,
`module.__path__[0]` will give the directory path.
Signed-off-by: Jinzhe Zeng <[email protected]>
1 parent f97b4f2 commit 787e2d3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments