Make sure that a parser class can only be registered once. Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxx> Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx> --- virtinst/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/virtinst/cli.py b/virtinst/cli.py index 21467a4d3430..73b6cdbdea5c 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1235,7 +1235,9 @@ VIRT_PARSERS = [] def _register_virt_parser(parserclass): - VIRT_PARSERS.append(parserclass) + # register the parser class only once + if parserclass not in VIRT_PARSERS: + VIRT_PARSERS.append(parserclass) ################### -- 2.17.0 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list