diff --git a/main.py b/main.py index 9ebe3c1..5f91f8c 100644 --- a/main.py +++ b/main.py @@ -352,7 +352,8 @@ def start(): if need_changes: # Clean old rules - stream.delete_rules([rule.id for rule in old_rules]) + if old_rules: + stream.delete_rules([rule.id for rule in old_rules]) # Add new rules stream.add_rules([StreamRule(rule) for rule in rules])