mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
InotifyReloader: Handle module.__file__ is None
0f527a01f4 added a fix for the case when some modules have the `__file__` attr set to `None`, for the polling reloader. Unfortunately, it missed making the same fix for the inotify reloader.
This change copies that fix into InotifyReloader
This commit is contained in:
parent
0ce857fced
commit
30554fdb4f
@ -96,7 +96,7 @@ if has_inotify:
|
||||
fnames = [
|
||||
os.path.dirname(COMPILED_EXT_RE.sub('py', module.__file__))
|
||||
for module in tuple(sys.modules.values())
|
||||
if hasattr(module, '__file__')
|
||||
if getattr(module, '__file__', None)
|
||||
]
|
||||
|
||||
return set(fnames)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user