mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Connection bug fix
This commit is contained in:
parent
0dd522f64a
commit
59fc6cc3fc
1 changed files with 5 additions and 4 deletions
|
@ -523,7 +523,7 @@ def connect_services(action_map):
|
|||
action_map -- Map of actions
|
||||
|
||||
Returns:
|
||||
Dict|int -- openned connections or error code
|
||||
Dict -- openned connections or error code
|
||||
|
||||
"""
|
||||
action_dict = action_map[sys.argv[1]]['actions'][sys.argv[2]]
|
||||
|
@ -542,7 +542,7 @@ def connect_services(action_map):
|
|||
# TODO: Add other services connections
|
||||
except YunoHostError, error:
|
||||
display_error(error)
|
||||
return error.code
|
||||
sys.exit(error.code)
|
||||
else:
|
||||
return connections
|
||||
|
||||
|
@ -554,10 +554,11 @@ def disconnect_services(connections):
|
|||
connections -- Dictionnary of openned connections
|
||||
|
||||
Returns:
|
||||
Boolean|int
|
||||
Boolean
|
||||
|
||||
"""
|
||||
try:
|
||||
print connections
|
||||
if 'ldap' in connections:
|
||||
connections['ldap'].disconnect()
|
||||
if 'firewall' in connections:
|
||||
|
@ -565,7 +566,7 @@ def disconnect_services(connections):
|
|||
# TODO: Add other services deconnections
|
||||
except YunoHostError, error:
|
||||
display_error(error)
|
||||
return error.code
|
||||
sys.exit(error.code)
|
||||
else:
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in a new issue