ldcheck.py

changeset 122
116a81996832
parent 116
60cac583b5df
child 145
fde18c4d6784
--- a/ldcheck.py	Fri Sep 18 20:26:19 2020 +0300
+++ b/ldcheck.py	Fri Sep 18 20:32:42 2020 +0300
@@ -29,6 +29,7 @@
     if config != read_config:
         config.write()
     check_library_paths(config)
+    load_ldconfig_ldr(config)
     return config
 
 def library_paths(config):
@@ -86,6 +87,11 @@
             ))
         exit(0)
 
+def load_ldconfig_ldr(config):
+    for ldconfig_ldr_path in find_ldconfig_ldr_paths(config):
+        with ldconfig_ldr_path.open() as ldconfig_ldr:
+            load_colours(ldconfig_ldr)
+
 def format_report(report, model, test_suite, *, use_colors = True):
     from testsuite import problem_text
     messages = []
@@ -145,9 +151,6 @@
     )
     args = parser.parse_args()
     config = load_config()
-    for ldconfig_ldr_path in find_ldconfig_ldr_paths(config):
-        with ldconfig_ldr_path.open() as ldconfig_ldr:
-            load_colours(ldconfig_ldr)
     if args.color:
         try:
             import colorama

mercurial