mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
add os.path.abspath() in dirname generation of the reloader
Otherwise adding a watcher for a file located in the working directory generates an empty dirname, resulting in the following error: inotify.calls.InotifyError: Call failed (should not be -1): (-1) ERRNO=(0) Caused by the fact that we call inotify with an empty path
This commit is contained in:
parent
cfc93ad701
commit
e5310d15e9
@ -92,7 +92,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)
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user