mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
/opt may not exist ...
This commit is contained in:
parent
7403d4679f
commit
5fd74577c4
1 changed files with 4 additions and 1 deletions
|
@ -39,8 +39,11 @@ def _get_all_venvs(dir, level=0, maxlevel=3):
|
|||
maxlevel - the depth of the recursion
|
||||
level - do not edit this, used as an iterator
|
||||
"""
|
||||
# Using os functions instead of glob, because glob doesn't support hidden folders, and we need recursion with a fixed depth
|
||||
if not os.path.exists(dir):
|
||||
return []
|
||||
|
||||
result = []
|
||||
# Using os functions instead of glob, because glob doesn't support hidden folders, and we need recursion with a fixed depth
|
||||
for file in os.listdir(dir):
|
||||
path = os.path.join(dir, file)
|
||||
if os.path.isdir(path):
|
||||
|
|
Loading…
Add table
Reference in a new issue