Avoid errors with nremain/oremain processing in case the entry is not found.

This commit is contained in:
Leo Vasanko 2025-08-13 12:34:00 -07:00
parent 10f7ff29cd
commit 0e7da1f98d

View File

@ -271,7 +271,7 @@ def format_update(old, new):
insert_items = [] insert_items = []
while nidx < len(new) and new[nidx] not in oremain: while nidx < len(new) and new[nidx] not in oremain:
entry = new[nidx] entry = new[nidx]
nremain.remove(entry) nremain.discard(entry)
insert_items.append(entry) insert_items.append(entry)
nidx += 1 nidx += 1
if insert_items: if insert_items:
@ -392,8 +392,8 @@ def watcher_inotify(loop):
if not dirty: if not dirty:
t = time.monotonic() t = time.monotonic()
dirty = True dirty = True
# Wait a maximum of 0.5s to push the updates # Wait a maximum of 0.2s to push the updates
if dirty and time.monotonic() >= t + 0.5: if dirty and time.monotonic() >= t + 0.2:
break break
if dirty and state.root != rootmod: if dirty and state.root != rootmod:
try: try: