Skip to contentSkip to conversation

minikconf: print error entirely on stderr

PATCH In review Paolo Bonzini 2 participants 2 messages Sep 6, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 minikconf: print error entirely on stderr

While debugging an invalid configuration, I noticed that the clauses debug ends up on stderr but the header ("The following clauses were found..." ends up on stdout. This makes the contents of meson-logs/meson-log.txt a bit confusing.

---
 scripts/minikconf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/minikconf.py +1 -1
index bcd91015d34..6f7f43b2918 100644
@@ -112,7 +112,7 @@ def has_value(self):
         def set_value(self, val, clause):
             self.clauses_for_var.append(clause)
             if self.has_value() and self.value != val:
-                print("The following clauses were found for " + self.name)
+                print("The following clauses were found for " + self.name, file=sys.stderr)
                 for i in self.clauses_for_var:
                     print("    " + str(i), file=sys.stderr)
                 raise KconfigDataError('contradiction between clauses when setting %s' % self)
Signature · 1 line
2.46.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Paolo Bonzini

While debugging an invalid configuration, I noticed that the clauses debug ends up on stderr but the header ("The following clauses were found..." ends up on stdout. This makes the contents of meson-logs/meson-log.txt a bit confusing.

---
  scripts/minikconf.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)