From ba6acae24090bea271740e339e9f7e336bb92836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Tue, 19 Jan 2021 17:40:53 +0100 Subject: [PATCH] prepare_report.py: Prevent Windows-style paths from ending up in the bytecode report --- scripts/bytecodecompare/prepare_report.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/bytecodecompare/prepare_report.py b/scripts/bytecodecompare/prepare_report.py index d654569a4..744c6deb5 100755 --- a/scripts/bytecodecompare/prepare_report.py +++ b/scripts/bytecodecompare/prepare_report.py @@ -27,7 +27,7 @@ class FileReport: report = "" if self.contract_reports is None: - return f"{self.file_name}: \n" + return f"{self.file_name.as_posix()}: \n" for contract_report in self.contract_reports: bytecode = contract_report.bytecode if contract_report.bytecode is not None else '' @@ -35,8 +35,8 @@ class FileReport: # NOTE: Ignoring contract_report.file_name because it should always be either the same # as self.file_name (for Standard JSON) or just the '' placeholder (for CLI). - report += f"{self.file_name}:{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} {bytecode}\n" + report += f"{self.file_name.as_posix()}:{contract_report.contract_name} {metadata}\n" return report