mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Ignore the __pycache__ folder in diagnosis hook folder
This commit is contained in:
parent
cce020daac
commit
d5da3d899a
1 changed files with 2 additions and 1 deletions
|
@ -182,7 +182,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] == '~' or f.endswith(".pyc"):
|
||||
if f[0] == '.' or f[-1] == '~' or f.endswith(".pyc") \
|
||||
or (f.startswith("__") and f.endswith("__")):
|
||||
continue
|
||||
path = '%s%s/%s' % (folder, action, f)
|
||||
priority, name = _extract_filename_parts(f)
|
||||
|
|
Loading…
Add table
Reference in a new issue