Commit 591e542
committed
Handle modules with __file__ property being None
It's been discovered that some modules have the `__file__` property
being set as `None`. An example of a such module is `backports`.
Providing `None` to `os.path.abspath()` causes an exception:
`TypeError: expected str, bytes or os.PathLike object, not NoneType`
Related to #9461 parent cca651d commit 591e542
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
| |||
0 commit comments