# HG changeset patch
# User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr>
# Date 1622646867 -7200
#      Wed Jun 02 17:14:27 2021 +0200
# Node ID 2aaac04452e7e5989bf1233c10f72c1c21be378c
# Parent  ac2e6ae90cf99e8cc21137e644a85b9b8a1a9e3c
🚑 fix getting module_list

In the case of the CI, the path is the absolute path to the directory and this does not work at all with the current code (infinite loop)

diff --git a/odoo_scripts/config.py b/odoo_scripts/config.py
--- a/odoo_scripts/config.py
+++ b/odoo_scripts/config.py
@@ -61,23 +61,7 @@
                 _logger.error("Expansion without path for %s", name)
                 raise Exception("Expansion without path for %s" % name)
             else:
-                # put in re_path everything but the first path element
-                # this allows blacklisting odoo-mint/theme when expanding
-                # mint hr.
-                if path:
-                    d = os.path.split(path)
-                    p = ""
-                    while d:
-                        d, tail = d
-                        if d:
-                            p = os.path.join(tail, p)
-                            d = os.path.split(d)
-                    re_path = (
-                        os.path.join(p, value["path"]) if p else value["path"]
-                    )
-                else:
-                    re_path = value["path"]
-                if blacklist and re.match(blacklist, re_path):
+                if blacklist and re.match(blacklist, value["path"]):
                     _logger.info(
                         "Ignoring directory '%s' due to blacklisting",
                         os.path.join(path, value["path"])