diff --git a/pano/contract.py b/pano/contract.py index 87651908..b3b5ebeb 100644 --- a/pano/contract.py +++ b/pano/contract.py @@ -1,4 +1,3 @@ -import json import logging import pano.folder as folder @@ -58,14 +57,12 @@ def __init__(self, functions, problems): self.stor_defs = {} - def json(self): - return json.dumps( - { - "problems": self.problems, - "stor_defs": self.stor_defs, - "functions": [f.serialize() for f in self.functions], - } - ) + def json(self) -> dict: + return { + "problems": self.problems, + "stor_defs": self.stor_defs, + "functions": [f.serialize() for f in self.functions], + } def load(self, data): self.problems = data["problems"] diff --git a/pano/decompiler.py b/pano/decompiler.py index 7e1e0bd2..f5bbb53f 100644 --- a/pano/decompiler.py +++ b/pano/decompiler.py @@ -192,9 +192,7 @@ def dec(): try: decompilation.json = contract.json() except Exception: - # .json is a nice to have, whatever crazy error happens we should - # still proceed with the rest of decompilation - logger.exception("failed json serialization") + logger.exception("failed json dump") text_output = io.StringIO() with redirect_stdout(text_output):