On Tue, Jan 16, 2024 at 05:12:42PM +0100, Peter Krempa wrote:
+# Recursively traverse the schema and print out the schema query
strings for
+# the corresponding entries. In certain cases the schema references itself,
+# which is handled by passing a 'trace' list which contains the current path
+def dump_qmp_probe_strings_iter(name, cur, trace, schema):
+ obj = schema[name]
+
+ if name in trace:
+ print('%s (recursion)' % cur)
+ return
I'll openly admit that I'm pretty much completely unfamiliar with
this specific query DLS, so it might be a silly question, but what's
the use of printing this line? AFAICT it's just the line above it,
with ' (recursion)' appended. Wouldn't it make sense to skip it?
Other than that, the implementation looks sensible, though I might
have overlooked some subtlety because of the aforementioned
unfamiliarity.
--
Andrea Bolognani / Red Hat / Virtualization