Skip to content

Commit

Permalink
Honour a watch delay of forever (fix: lepture#125)
Browse files Browse the repository at this point in the history
Ensure that a delay value of `forever` gets added to the list of
returned delays so that we can prevent certain watch events from
triggering a reload.

This is essentially just implementing the work-around proposed by @dwt

ref: lepture#125 (comment)
  • Loading branch information
jerrykan committed Nov 29, 2020
1 parent ecabeba commit d69a5e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion livereload/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def examine(self):
if changed:
func = item['func']
delay = item['delay']
if delay and isinstance(delay, float):
if delay and isinstance(delay, float) or delay == 'forever':
delays.add(delay)
if func:
name = getattr(func, 'name', None)
Expand Down

0 comments on commit d69a5e4

Please sign in to comment.