Commit 1547791f by Feanil Patel

Merge pull request #1954 from edx/feanil/fix_sqs_plugin

Fix the callback plugin for cases where stderr is a boolean and not a string.
parents d791f48d 0e18731e
......@@ -133,7 +133,10 @@ class CallbackModule(object):
if output in payload[msg_type]:
# only keep the last 1000 characters
# of stderr and stdout
if len(payload[msg_type][output]) > 1000:
# Some modules set the value of stdout or stderr to booleans in
# which case the len will fail. Check to see if there is content
# before trying to clip it.
if payload[msg_type][output] and len(payload[msg_type][output]) > 1000:
payload[msg_type][output] = "(clipping) ... " \
+ payload[msg_type][output][-1000:]
if 'stdout_lines' in payload[msg_type]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment