From 632553f75e7b5ce8d26e49c5ce43645572ee74da Mon Sep 17 00:00:00 2001 From: Andrea Franchini <hello@andreafranchini.com> Date: Thu, 22 Jun 2023 15:14:54 +0200 Subject: [PATCH] fix bug related to poorly formatted log warn --- mc_openapi/__main__.py | 2 +- mc_openapi/doml_mc/xmi_parser/ecore.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mc_openapi/__main__.py b/mc_openapi/__main__.py index 9fc5fd2..3c7a2e8 100644 --- a/mc_openapi/__main__.py +++ b/mc_openapi/__main__.py @@ -104,7 +104,7 @@ else: res = verify_model(dmc, domlr_src, args.threads, args.consistency, args.skip_builtin) print("[RESULT]") - if res['result'] == MCResult.sat: + if res['result'] == MCResult.sat.name: print(res['description']) else: print(res['result']) diff --git a/mc_openapi/doml_mc/xmi_parser/ecore.py b/mc_openapi/doml_mc/xmi_parser/ecore.py index 0cc79be..69f858d 100644 --- a/mc_openapi/doml_mc/xmi_parser/ecore.py +++ b/mc_openapi/doml_mc/xmi_parser/ecore.py @@ -75,7 +75,7 @@ class ELayerParser: elif isinstance(val, EOrderedSet): raw_attrs[eAttr.name] = [str(v) if isinstance(v, EEnumLiteral) else v for v in val] else: - logging.error("Attribute", eAttr.name, "has value", val, "of unexpected type.", file=sys.stderr) + logging.error(f"Attribute {eAttr.name} has value {val} of unexpected type.") attrs = parse_attributes(raw_attrs, mm_class, self.mm) # Get all references and process them -- GitLab