mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Do not fail at hook removal (fixes #57)
This commit is contained in:
parent
148308e8e5
commit
c5f3488014
1 changed files with 6 additions and 4 deletions
|
@ -66,10 +66,12 @@ def hook_remove(app):
|
|||
app -- Scripts related to app will be removed
|
||||
|
||||
"""
|
||||
for action in os.listdir(hook_folder):
|
||||
for script in os.listdir(hook_folder + action):
|
||||
if script.endswith(app):
|
||||
os.remove(hook_folder + action +'/'+ script)
|
||||
try:
|
||||
for action in os.listdir(hook_folder):
|
||||
for script in os.listdir(hook_folder + action):
|
||||
if script.endswith(app):
|
||||
os.remove(hook_folder + action +'/'+ script)
|
||||
except OSError: pass
|
||||
|
||||
|
||||
def hook_callback(action, args=None):
|
||||
|
|
Loading…
Add table
Reference in a new issue