diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2016-11-21 16:33:30 +0200 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2016-11-21 16:33:30 +0200 |
commit | 9abc4748745b853352502d29094f779e9e134f24 (patch) | |
tree | e1454e5a12c9f66859ceb51529be41f33ef0f2d7 /python.d | |
parent | 4d7c13e7982b5fb4f8c1a9d4c716050d2cc5be91 (diff) |
really exit on fatal situations, even if no output is possible; fixes #1155
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/python_modules/msg.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/python.d/python_modules/msg.py b/python.d/python_modules/msg.py index b835c94045..74716770c8 100644 --- a/python.d/python_modules/msg.py +++ b/python.d/python_modules/msg.py @@ -93,8 +93,9 @@ def fatal(*args): """ Print message on stderr and exit. """ - log_msg("FATAL", *args) - # using sys.stdout causes IOError: Broken Pipe - print('DISABLE') - # sys.stdout.write('DISABLE\n') + try: + log_msg("FATAL", *args) + print('DISABLE') + except: + pass sys.exit(1) |