BLD: [mktplace] json handling improvement

This commit is contained in:
Victor Grau Serrat
2018-03-23 12:38:37 -06:00
parent 0db9950347
commit b979ffd123
+8 -2
View File
@@ -70,7 +70,10 @@ class Marketplace:
contract_url.info().get_content_charset()).strip())
abi_url = urllib.urlopen(MARKETPLACE_CONTRACT_ABI)
abi = json.load(abi_url)
abi_url = abi_url.read().decode(
abi_url.info().get_content_charset())
abi = json.loads(abi_url)
self.mkt_contract = self.web3.eth.contract(
self.mkt_contract_address,
@@ -84,7 +87,10 @@ class Marketplace:
contract_url.info().get_content_charset()).strip())
abi_url = urllib.urlopen(ENIGMA_CONTRACT_ABI)
abi = json.load(abi_url)
abi_url = abi_url.read().decode(
abi_url.info().get_content_charset())
abi = json.loads(abi_url)
self.eng_contract = self.web3.eth.contract(
self.eng_contract_address,