Clarification regarding the use of os functions instead of glob

This commit is contained in:
theo@manjaro 2022-07-22 15:26:10 +02:00
parent 1ce13d631d
commit a440afe8eb

View file

@ -35,6 +35,7 @@ VENV_REQUIREMENTS_SUFFIX = "_req.txt"
VENV_IGNORE = "VENVNOREGEN" VENV_IGNORE = "VENVNOREGEN"
def _get_all_venvs(dir,level=0,maxlevel=2): def _get_all_venvs(dir,level=0,maxlevel=2):
# Using os functions instead of glob, because glob doesn't support hidden folders, and we need recursion with a fixed depth
result = [] result = []
for file in os.listdir(dir): for file in os.listdir(dir):
path = os.path.join(dir,file) path = os.path.join(dir,file)