From b7bd7f6adb9e0d7207bcc236a9a9beb55be302db Mon Sep 17 00:00:00 2001 From: Nick Gheorghita Date: Thu, 13 Dec 2018 14:45:48 +0100 Subject: [PATCH] Builder bug --- ethpm/tools/builder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ethpm/tools/builder.py b/ethpm/tools/builder.py index 0493794..245bb86 100644 --- a/ethpm/tools/builder.py +++ b/ethpm/tools/builder.py @@ -425,7 +425,8 @@ def normalize_contract_type( contract_type_data.get("userdoc", {}), contract_type_data.get("devdoc", {}) ) yield "natspec", natspec - if "metadata" in contract_type_data: + # make sure metadata isn't an empty string in solc output + if "metadata" in contract_type_data and contract_type_data["metadata"]: yield "compiler", normalize_compiler_object( json.loads(contract_type_data["metadata"]) )