mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Skip hidden and temp files in hook_list
This commit is contained in:
parent
b053ba6ac1
commit
3ed502894c
1 changed files with 2 additions and 0 deletions
|
@ -176,6 +176,8 @@ def hook_list(action, list_by='name', show_info=False):
|
|||
def _append_folder(d, folder):
|
||||
# Iterate over and add hook from a folder
|
||||
for f in os.listdir(folder + action):
|
||||
if f[0] == '.' or f[-1] == '~':
|
||||
continue
|
||||
path = '%s%s/%s' % (folder, action, f)
|
||||
priority, name = _extract_filename_parts(f)
|
||||
_append_hook(d, priority, name, path)
|
||||
|
|
Loading…
Add table
Reference in a new issue