fix action

This commit is contained in:
Adrien Beudin 2014-06-26 12:30:16 +02:00
parent 92b934fc85
commit ffc0f0bd53

View file

@ -172,7 +172,7 @@ def firewall_reload():
if os.system("iptables -P INPUT ACCEPT") != 0: if os.system("iptables -P INPUT ACCEPT") != 0:
raise MoulinetteError(errno.ESRCH, m18n.n('iptables_unavailable')) raise MoulinetteError(errno.ESRCH, m18n.n('iptables_unavailable'))
if upnp: if upnp:
firewall_upnp(action="reload") firewall_upnp(action=['reload'])
os.system("iptables -F") os.system("iptables -F")
os.system("iptables -X") os.system("iptables -X")
@ -227,9 +227,7 @@ def firewall_upnp(action=None):
""" """
firewall = firewall_list(raw=True) firewall = firewall_list(raw=True)
if action == 'reload': if action:
action = action[0:]
else:
action = action[0] action = action[0]
if action == 'enable': if action == 'enable':