From c0d77c60b980e8432dd5c854886901dcd05e5f05 Mon Sep 17 00:00:00 2001
From: easybuild <you@example.com>
Date: Fri, 24 May 2024 10:56:30 +0200
Subject: [PATCH] fix

---
 modules.py | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/modules.py b/modules.py
index 6aa734e6..446663f5 100755
--- a/modules.py
+++ b/modules.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 """Script to generate module lists"""
 
 import os
@@ -43,10 +43,17 @@ if __name__ == "__main__":
     SUBDIRS = os.environ['MODULEPATH'].split(':')
 
     for subdir in sorted(SUBDIRS, key=lambda s: s.lower()):
+        # Ignore the specific path
+        if subdir == "/apps/all/Lmod/8.7.37/modulefiles/Core":
+            continue
+        if subdir == "/apps/all/Lmod/8.7.37/modulefiles/Linux":
+            continue
+
+        
         available_software = get_software_list(subdir)
-        print "\n## %s\n" % os.path.basename(subdir).title()
-        print "| Module | Description |"
-        print "| ------ | ----------- |"
+        print("\n## {}\n".format(os.path.basename(subdir).title()))
+        print("| Module | Description |")
+        print("| ------ | ----------- |")
         HTML_SOURCE_DATA[subdir] = {}
         for soft in sorted(available_software, key=str.lower):
             software_path = os.path.join(subdir, soft)
@@ -63,6 +70,6 @@ if __name__ == "__main__":
             for version in software_versions:
                 HTML_SOURCE_DATA[subdir][soft]['versions'].append(version)
             if software_url in ["", "(none)", "N/A"]:
-                print "| %s | %s |" % (soft, " ".join(software_description.split()))
+                print("| {} | {} |".format(soft, " ".join(software_description.split())))
             else:
-                print "| [%s](%s) | %s |" % (soft, software_url, " ".join(software_description.split()))
+                print("| [{}]({}) | {} |".format(soft, software_url, " ".join(software_description.split())))
-- 
GitLab