We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d883e4b commit 19c4a28Copy full SHA for 19c4a28
images/python/bootstrap.py
@@ -241,7 +241,8 @@ def filter(self, record):
241
stopWithError("Failed to read {payloadFileName}. err={err}".format(payloadFileName=(payloadFileName or '<stdin>'), err=e))
242
243
try:
244
- payload = json.loads(payload)
+ if len(payload) > 0:
245
+ payload = json.loads(payload)
246
except:
247
debugging and print ('payload is ') and print (payload)
248
stopWithError('Payload is not JSON')
@@ -261,7 +262,7 @@ def filter(self, record):
261
262
263
264
result = caller.call(payload, context)
- #FIXME where to put result in async mode?
265
+ sys.stdout.write(json.dumps(result))
266
except Exception as e:
267
stopWithError(e)
268
0 commit comments