@@ -128,7 +128,9 @@ def exec_run_with_timeout(self, command: str) -> tuple[str, bool, float]:
128
128
exit_code , test_output = self ._exec_run (f"test -e { report_file } " )
129
129
# Check the exit code of the command
130
130
if exit_code == 0 :
131
- copy_from_container (self .container , report_file , self .log_dir / "report.json" )
131
+ copy_from_container (
132
+ self .container , report_file , self .log_dir / "report.json"
133
+ )
132
134
delete_file_from_container (self .container , str (report_file ))
133
135
return output
134
136
@@ -170,7 +172,6 @@ def __init__(
170
172
171
173
def exec_run_with_timeout (self , command : str ) -> tuple [str , bool , float ]:
172
174
"""Execute command on modal sandbox"""
173
-
174
175
with modal .Volume .ephemeral () as vol :
175
176
# copy back report.json if there is any
176
177
report_file = Path (self .spec .repo_directory ) / "report.json"
@@ -194,7 +195,8 @@ def exec_run_with_timeout(self, command: str) -> tuple[str, bool, float]:
194
195
stderr = read_stream (self .sandbox .stderr )
195
196
print (stderr )
196
197
197
- return_code = self .sandbox .returncode
198
+ # return_code = self.sandbox.returncode
199
+ # maybe use return_code for timeout info?
198
200
199
201
with (self .log_dir / "report.json" ).open ("wb" ) as f :
200
202
for data in vol .read_file ("report.json" ):
0 commit comments