From 47217f2f290264b0467a079492779cbf3cbfa4f0 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Thu, 31 Oct 2013 10:15:42 +0100 Subject: [PATCH] Reduce the set of events that trigger a reload. This seems to avoid multiple reloads. --- django/utils/autoreload.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 9acd52e6e8..6816403cc7 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -144,15 +144,7 @@ def kqueue_code_changed(): _filter = select.KQ_FILTER_VNODE flags = select.KQ_EV_ADD - fflags = ( - select.KQ_NOTE_DELETE | - select.KQ_NOTE_WRITE | - select.KQ_NOTE_EXTEND | - select.KQ_NOTE_ATTRIB | - select.KQ_NOTE_LINK | - select.KQ_NOTE_RENAME | - select.KQ_NOTE_REVOKE - ) + fflags = select.KQ_NOTE_DELETE | select.KQ_NOTE_WRITE | select.KQ_NOTE_RENAME kevents = [select.kevent(fd, _filter, flags, fflags) for fd in fds] kqueue.control(kevents, 1)