Skip to content

Commit 4d7c13e

Browse files
committed
python.d.plugin should exit if it cannot send data to netdata; fixes netdata#1155
1 parent 47ff6bf commit 4d7c13e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

python.d/python_modules/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,10 @@ def commit(self):
320320
"""
321321
Upload new data to netdata.
322322
"""
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))
324327
self._data_stream = ""
325328

326329
# --- ERROR HANDLING ---

0 commit comments

Comments
 (0)