@@ -323,59 +323,46 @@ def _on_done_internal(self):
323
323
@property
324
324
def stdout_content (self ) -> str :
325
325
"""
326
- The content of stdout, must be called after the execution has completed
327
- and only if store_stdout has been set to True
326
+ The content of stdout, must be called only if store_stdout has been set
327
+ to True
328
328
"""
329
329
if not self .store_stdout :
330
330
raise ValueError ("Stdout was not captured" )
331
- if not self .result :
332
- raise RuntimeError ("stdout_content must be called after "
333
- "the execution has completed" )
334
331
return self ._stdout
335
332
336
333
@property
337
334
def stderr_content (self ) -> str :
338
335
"""
339
- The content of stderr, must be called after the execution has completed
340
- and only if store_stderr has been set to True
336
+ The content of stderr, must be called only if store_stderr has been set
337
+ to True
341
338
"""
342
339
if not self .store_stderr :
343
340
raise ValueError ("Stderr was not captured" )
344
- if not self .result :
345
- raise RuntimeError ("stderr_content must be called after "
346
- "the execution has completed" )
347
341
return self ._stderr
348
342
349
343
@property
350
344
def stdout_content_bytes (self ) -> bytes :
351
345
"""
352
- The content of stdout as bytes, must be called after the execution has
353
- completed and only if store_stdout_bytes has been set to True
346
+ The content of stdout as bytes, must be called only if
347
+ store_stdout_bytes has been set to True
354
348
"""
355
349
if not self .store_stdout_bytes :
356
350
raise ValueError ("Stdout was not captured as bytes" )
357
- if not self .result :
358
- raise RuntimeError ("stdout_content_bytes must be called after "
359
- "the execution has completed" )
360
351
return self ._stdout_bytes
361
352
362
353
@property
363
354
def stderr_content_bytes (self ) -> bytes :
364
355
"""
365
- The content of stderr as bytes, must be called after the execution has
366
- completed and only if store_stderr_bytes has been set to True
356
+ The content of stderr as bytes, must be called only if
357
+ store_stderr_bytes has been set to True
367
358
"""
368
359
if not self .store_stderr_bytes :
369
360
raise ValueError ("Stderr was not captured as bytes" )
370
- if not self .result :
371
- raise RuntimeError ("stderr_content_bytes must be called after "
372
- "the execution has completed" )
373
361
return self ._stderr_bytes
374
362
375
363
def output (self , path : str ) -> File :
376
364
"""
377
- The file generated by the execution on that path. Must be called after
378
- the execution has completed.
365
+ The file generated by the execution on that path.
379
366
"""
380
367
if path not in self ._outputs :
381
368
raise ValueError ("%s is not registered as an output" % path )
0 commit comments