From b3b18f97f876b25e92010d4a6d7b132ea20edd98 Mon Sep 17 00:00:00 2001 From: donoban Date: Wed, 7 Mar 2018 16:37:44 -0500 Subject: [PATCH] Wrong init var to bool and missing call to total_seconds() fix https://github.com/QubesOS/qubes-issues/issues/3661 --- qubes/firewall.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qubes/firewall.py b/qubes/firewall.py index 99b56868..4cd47e3e 100644 --- a/qubes/firewall.py +++ b/qubes/firewall.py @@ -556,7 +556,7 @@ class Firewall(object): def save(self): '''Save firewall rules to a file''' firewall_conf = os.path.join(self.vm.dir_path, self.vm.firewall_conf) - nearest_expire = False + nearest_expire = None xml_root = lxml.etree.Element('firewall', version=str(2)) @@ -595,7 +595,7 @@ class Firewall(object): # necessary must be the same as time module; calculate delay and # use call_later instead expire_when = nearest_expire - datetime.datetime.now() - loop.call_later(expire_when, self._expire_rules) + loop.call_later(expire_when.total_seconds(), self._expire_rules) def qdb_entries(self, addr_family=None): '''Return firewall settings serialized for QubesDB entries