openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dube...@apache.org
Subject [incubator-openwhisk-package-kafka] branch master updated: Treat malformed JSON as a string (#295)
Date Fri, 12 Oct 2018 14:47:21 GMT
This is an automated email from the ASF dual-hosted git repository.

dubeejw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-kafka.git


The following commit(s) were added to refs/heads/master by this push:
     new a2762f8  Treat malformed JSON as a string (#295)
a2762f8 is described below

commit a2762f807358f66477ed0b7daa545193210e164c
Author: James Dubee <jwdubee@us.ibm.com>
AuthorDate: Fri Oct 12 10:47:17 2018 -0400

    Treat malformed JSON as a string (#295)
---
 provider/consumer.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/provider/consumer.py b/provider/consumer.py
index 9b48a2d..a061c86 100644
--- a/provider/consumer.py
+++ b/provider/consumer.py
@@ -477,6 +477,7 @@ class ConsumerProcess (Process):
             except ValueError:
                 # no big deal, just return the original value
                 logging.warn('[{}] I was asked to encode a message as JSON, but I failed.'.format(self.trigger))
+                value = "\"{}\"".format(value)
                 pass
         elif self.encodeValueAsBase64:
             try:


Mime
View raw message