@cryptotaxi247 / netdata-1 / commits / 9abc47487

really exit on fatal situations, even if no output is possible; fixes #1155

Costa Tsaousis committed Nov 21, 2016 at 16:33 UTC 9abc4748745b853352502d29094f779e9e134f24
1 file changed +5 -4
python.d/python_modules/msg.py
+5 -4
@@ -93,8 +93,9 @@ def fatal(*args):
93 """
94 Print message on stderr and exit.
95 """
96 - log_msg("FATAL", *args)
97 - # using sys.stdout causes IOError: Broken Pipe
98 - print('DISABLE')
99 - # sys.stdout.write('DISABLE\n')
96 + try:
97 + log_msg("FATAL", *args)
98 + print('DISABLE')
99 + except:
100 + pass
101 sys.exit(1)