Skip to content

Commit a2c7147

Browse files
authored
Merge pull request #303 from crytic/brownie-version-hot-fix
hot fix
2 parents 1900477 + cfba898 commit a2c7147

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crytic_compile/platform/brownie.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ def _get_version(compiler: Dict) -> str:
206206
str: Compiler version
207207
"""
208208
version = compiler.get("version", "")
209-
version = version[len("Version: ") :]
210-
version = version[0 : version.find("+")]
209+
if "Version:" in version:
210+
version = version.split("Version:")[1].strip()
211+
version = version[0 : version.find("+")] # TODO handle not "+" not found
211212
return version
212213

213214

0 commit comments

Comments
 (0)