diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2016-11-21 16:28:20 +0200 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2016-11-21 16:28:20 +0200 |
commit | 4d7c13e7982b5fb4f8c1a9d4c716050d2cc5be91 (patch) | |
tree | fb0e723205f62eafff86600509581f0f564ff1d7 /python.d | |
parent | 47ff6bfe8ea2cdc231895b89533eeee8719e4bb4 (diff) |
python.d.plugin should exit if it cannot send data to netdata; fixes #1155
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/python_modules/base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python.d/python_modules/base.py b/python.d/python_modules/base.py index fdacbc98eb..dd86e29544 100644 --- a/python.d/python_modules/base.py +++ b/python.d/python_modules/base.py @@ -320,7 +320,10 @@ class SimpleService(threading.Thread): """ Upload new data to netdata. """ - print(self._data_stream) + try: + print(self._data_stream) + except Exception as e: + msg.fatal('cannot send data to netdata:', str(e)) self._data_stream = "" # --- ERROR HANDLING --- |