Merge pull request #2227 from mikaeldusenne/hotfix/empty-dirname-inotify

add os.path.abspath() in dirname generation of the reloader
This commit is contained in:
Randall Leeds 2019-12-30 12:59:54 -08:00 committed by GitHub
commit 57fbbce554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ if has_inotify:
def get_dirs(self):
fnames = [
os.path.dirname(COMPILED_EXT_RE.sub('py', module.__file__))
os.path.dirname(os.path.abspath(COMPILED_EXT_RE.sub('py', module.__file__)))
for module in tuple(sys.modules.values())
if getattr(module, '__file__', None)
]