mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Fix indentation
This commit is contained in:
parent
ad223a6373
commit
993815181d
1 changed files with 39 additions and 44 deletions
|
@ -25,17 +25,17 @@ def firewall_allow(protocol=None,port=None,ipv6=None):
|
|||
Dict
|
||||
|
||||
"""
|
||||
|
||||
if int(port)<65536 and int(port)>0:
|
||||
if protocol == "Both":
|
||||
|
||||
update_yml(port,'tcp','a',ipv6)
|
||||
update_yml(port,'udp','a',ipv6)
|
||||
|
||||
else:
|
||||
|
||||
update_yml(port,protocol,'a',ipv6)
|
||||
|
||||
win_msg(_("Port successfully openned"))
|
||||
|
||||
else:
|
||||
raise YunoHostError(22,_("Port not between 1 and 65535 : ")+port)
|
||||
|
||||
|
@ -140,7 +140,6 @@ def firewall_reload():
|
|||
def update_yml(port=None,protocol=None,mode=None,ipv6=None):
|
||||
"""
|
||||
Update firewall.yml
|
||||
|
||||
Keyword arguments:
|
||||
protocol -- Protocol used
|
||||
port -- Port to open
|
||||
|
@ -149,7 +148,6 @@ def update_yml(port=None,protocol=None,mode=None,ipv6=None):
|
|||
|
||||
Return
|
||||
None
|
||||
|
||||
"""
|
||||
if ipv6:
|
||||
ip = 'ipv6'
|
||||
|
@ -179,6 +177,3 @@ def update_yml(port=None,protocol=None,mode=None,ipv6=None):
|
|||
with open('firewall.yml','w') as f:
|
||||
yaml.dump(firewall,f)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue