From 56ed89dafdabc0617d712df58397274e9cf23f50 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Sat, 7 Oct 2023 00:40:24 +0000 Subject: [PATCH] Avoid a stack trace when raising DuplicateError --- db/schemas/gen_comments.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/db/schemas/gen_comments.py b/db/schemas/gen_comments.py index 2cb5e52..3fb3b71 100755 --- a/db/schemas/gen_comments.py +++ b/db/schemas/gen_comments.py @@ -215,10 +215,12 @@ def find_schemas_objects(schema, cf, db_objs): old = db_objs[objname].typepath old_schema = old.split("/")[0] if old_schema != schema: - raise DuplicateError( - "Cannot write comments:" - f" db object {objname} in {child}" - f" is duplicated in {old}" + sys.exit( + DuplicateError( + "Cannot write comments:" + f" db object {objname} in {child}" + f" is duplicated in {old}" + ) ) else: db_obj = DBObj() -- 2.34.1