From 39d904ea824337dceb9db444e71290a6dc0ba667 Mon Sep 17 00:00:00 2001 From: donoban Date: Thu, 8 Mar 2018 05:25:42 -0500 Subject: [PATCH] Removed self.rules != old_rules After lot of testing it does not work properly. Could do something more sophisticated but since calling save() is safe and probably lightweigth it is not worth probably. --- qubes/firewall.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qubes/firewall.py b/qubes/firewall.py index 74a93685..dbf2a9e3 100644 --- a/qubes/firewall.py +++ b/qubes/firewall.py @@ -546,12 +546,10 @@ class Firewall(object): def _expire_rules(self): '''Function called to reload expired rules''' - old_rules = self.rules self.load() - if self.rules != old_rules: - # this will both save rules skipping those expired and trigger - # QubesDB update; and possibly schedule another timer - self.save() + # this will both save rules skipping those expired and trigger + # QubesDB update; and possibly schedule another timer + self.save() def save(self): '''Save firewall rules to a file'''