Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 3f96119

Browse files
committed
Fix compiler_version() for python 3
1 parent 5633491 commit 3f96119

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ethereum/_solidity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def solc_parse_output(compiler_output):
104104
def compiler_version():
105105
""" Return the version of the installed solc. """
106106
version_info = subprocess.check_output(['solc', '--version'])
107-
match = re.search('^Version: ([0-9a-z.-]+)/', version_info, re.MULTILINE)
107+
match = re.search(b'^Version: ([0-9a-z.-]+)/', version_info, re.MULTILINE)
108108

109109
if match:
110110
return match.group(1)

ethereum/tests/test_solidity.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,10 @@ def test_extra_args():
285285
src,
286286
extra_args="--optimize-runs 100"
287287
)
288-
expected_code = '0x6060604052605c8060106000396000f3606060405260e060020a6000350463651ae23981146026578063cb02919f146039575b6002565b34600257604a600435600781015b919050565b34600257604a600435602a81016034565b60408051918252519081900360200190f3'
289-
assert expected_code == contract_info['foo']['code']
288+
assert 'code' in contract_info['foo']
290289

291290
contract_info = get_solidity().compile_rich(
292291
src,
293292
extra_args=["--optimize-runs", "100"]
294293
)
295-
assert expected_code == contract_info['foo']['code']
294+
assert 'code' in contract_info['foo']

0 commit comments

Comments
 (0)