From ffc0f0bd531a8cde131399b7ec89ff43a86a28ad Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Thu, 26 Jun 2014 12:30:16 +0200 Subject: [PATCH] fix action --- firewall.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/firewall.py b/firewall.py index ab27d892d..c7b0aae15 100644 --- a/firewall.py +++ b/firewall.py @@ -172,7 +172,7 @@ def firewall_reload(): if os.system("iptables -P INPUT ACCEPT") != 0: raise MoulinetteError(errno.ESRCH, m18n.n('iptables_unavailable')) if upnp: - firewall_upnp(action="reload") + firewall_upnp(action=['reload']) os.system("iptables -F") os.system("iptables -X") @@ -227,9 +227,7 @@ def firewall_upnp(action=None): """ firewall = firewall_list(raw=True) - if action == 'reload': - action = action[0:] - else: + if action: action = action[0] if action == 'enable':