mirror of
https://github.com/ansible/awx.git
synced 2026-05-03 23:55:28 -02:30
properly handle STDOUT_MAX_BYTES_DISPLAY for system jobs
see: https://github.com/ansible/ansible-tower/issues/7890
This commit is contained in:
@@ -2968,7 +2968,14 @@ class SystemJobSerializer(UnifiedJobSerializer):
|
||||
return res
|
||||
|
||||
def get_result_stdout(self, obj):
|
||||
return obj.result_stdout
|
||||
try:
|
||||
return obj.result_stdout
|
||||
except StdoutMaxBytesExceeded as e:
|
||||
return _(
|
||||
"Standard Output too large to display ({text_size} bytes), "
|
||||
"only download supported for sizes over {supported_size} bytes").format(
|
||||
text_size=e.total, supported_size=e.supported
|
||||
)
|
||||
|
||||
|
||||
class SystemJobCancelSerializer(SystemJobSerializer):
|
||||
|
||||
Reference in New Issue
Block a user