mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
prepare_report.py: Prevent Windows-style paths from ending up in the bytecode report
This commit is contained in:
parent
ead1a26f21
commit
ba6acae240
@ -27,7 +27,7 @@ class FileReport:
|
|||||||
report = ""
|
report = ""
|
||||||
|
|
||||||
if self.contract_reports is None:
|
if self.contract_reports is None:
|
||||||
return f"{self.file_name}: <ERROR>\n"
|
return f"{self.file_name.as_posix()}: <ERROR>\n"
|
||||||
|
|
||||||
for contract_report in self.contract_reports:
|
for contract_report in self.contract_reports:
|
||||||
bytecode = contract_report.bytecode if contract_report.bytecode is not None else '<NO BYTECODE>'
|
bytecode = contract_report.bytecode if contract_report.bytecode is not None else '<NO BYTECODE>'
|
||||||
@ -35,8 +35,8 @@ class FileReport:
|
|||||||
|
|
||||||
# NOTE: Ignoring contract_report.file_name because it should always be either the same
|
# NOTE: Ignoring contract_report.file_name because it should always be either the same
|
||||||
# as self.file_name (for Standard JSON) or just the '<stdin>' placeholder (for CLI).
|
# as self.file_name (for Standard JSON) or just the '<stdin>' placeholder (for CLI).
|
||||||
report += f"{self.file_name}:{contract_report.contract_name} {bytecode}\n"
|
report += f"{self.file_name.as_posix()}:{contract_report.contract_name} {bytecode}\n"
|
||||||
report += f"{self.file_name}:{contract_report.contract_name} {metadata}\n"
|
report += f"{self.file_name.as_posix()}:{contract_report.contract_name} {metadata}\n"
|
||||||
|
|
||||||
return report
|
return report
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user