Do not print image string data on the screen
Do not print the image data which is annoying and distracting.
BUG=chromium:475168
TEST=When webplot is terminated, observe that there is no
lengthy image string data displayed on the console.
Change-Id: I090a6626d1d894a88b28b52e5852eb98b8374076
Reviewed-on: https://chromium-review.googlesource.com/264898
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
diff --git a/webplot/webplot.py b/webplot/webplot.py
index 936794f..b5a85ea 100755
--- a/webplot/webplot.py
+++ b/webplot/webplot.py
@@ -102,10 +102,14 @@
def received_message(self, msg):
"""A callback for received message."""
- cherrypy.log('Received message: %s' % str(msg.data))
data = msg.data.split(':', 1)
mtype = data[0].lower()
content = data[1] if len(data) == 2 else None
+
+ # Do not print the image data since it is too large.
+ if mtype != 'save':
+ cherrypy.log('Received message: %s' % str(msg.data))
+
if mtype == 'quit':
# A shutdown message requested by the user.
cherrypy.log('The user requests to shutdown the cherrypy server....')