From 18442b2449a65696c9abf47dbb57877a0fdee024 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 11 Aug 2022 15:59:48 +0200 Subject: [PATCH] /opt may not exist ... --- src/migrations/0024_rebuild_python_venv.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/migrations/0024_rebuild_python_venv.py b/src/migrations/0024_rebuild_python_venv.py index f39c27c49..10db7a34a 100644 --- a/src/migrations/0024_rebuild_python_venv.py +++ b/src/migrations/0024_rebuild_python_venv.py @@ -30,6 +30,9 @@ def _get_all_venvs(dir, level=0, maxlevel=3): maxlevel - the depth of the recursion level - do not edit this, used as an iterator """ + if not os.path.exists(dir): + return [] + # Using os functions instead of glob, because glob doesn't support hidden # folders, and we need recursion with a fixed depth result = []