Skip to content

Commit c3f1004

Browse files
authored
hot fix
version does not always contain "Version:"
1 parent 1ca05b8 commit c3f1004

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)