bugfix when port already add!

This commit is contained in:
titoko 2013-06-29 15:54:32 +02:00
parent 5626d1667b
commit 726c16ab70

View file

@ -172,11 +172,11 @@ def update_yml(port=None, protocol=None, mode=None, ipv6=None, upnp=False):
if port not in firewall[ip][protocol]:
firewall[ip][protocol].append(port)
else:
raise YunoHostError(22, _("Port already openned :") + str(port))
if upnp:
else if upnp:
if port not in firewall[ip]['upnp'][protocol]:
firewall[ip]['upnp'][protocol].append(port)
else:
raise YunoHostError(22, _("Port already openned :") + str(port))
else:
raise YunoHostError(22, _("Port already openned :") + str(port))