From 17adfe4137cfd1c1734ff1b77304f70e163313fa Mon Sep 17 00:00:00 2001
From: Eric Garver <e@erig.me>
Date: Tue, 9 Oct 2018 14:55:21 -0400
Subject: [PATCH 018/127] firewalld: fix --runtime-to-permanent if NM not in
 use.

Due to scope "settings" was not defined.

Fixes: #404
Fixes: e7c00a4063ff ("ifcfg: Modify ZONE= on permanent config changes")
---
 src/firewall/server/firewalld.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/firewall/server/firewalld.py b/src/firewall/server/firewalld.py
index 6810b68c..bc04f2d0 100644
--- a/src/firewall/server/firewalld.py
+++ b/src/firewall/server/firewalld.py
@@ -441,8 +441,8 @@ class FirewallD(slip.dbus.service.Object):
         nm_bus_name = nm_get_bus_name()
         for name in self.fw.zone.get_zones():
             conf = self.getZoneSettings(name)
+            settings = FirewallClientZoneSettings(conf)
             if nm_bus_name is not None:
-                settings = FirewallClientZoneSettings(conf)
                 changed = False
                 for interface in settings.getInterfaces():
                     if self.fw.zone.interface_get_sender(name, interface) == nm_bus_name:
-- 
2.19.1

