python.d.plugin should exit if it cannot send data to netdata; fixes #1155
Costa Tsaousis committed
Nov 21, 2016 at 16:28 UTC
4d7c13e7982b5fb4f8c1a9d4c716050d2cc5be91
1 file changed
+4
-1
python.d/python_modules/base.py
+4
-1
@@ -320,7 +320,10 @@ class SimpleService(threading.Thread):
320
"""
321
Upload new data to netdata.
322
"""
323
- print(self._data_stream)
323
+ try:
324
+ print(self._data_stream)
325
+ except Exception as e:
326
+ msg.fatal('cannot send data to netdata:', str(e))
327
self._data_stream = ""
328
329
# --- ERROR HANDLING ---