]> arthur.barton.de Git - netdata.git/commitdiff
really exit on fatal situations, even if no output is possible; fixes #1155
authorCosta Tsaousis <costa@tsaousis.gr>
Mon, 21 Nov 2016 14:33:30 +0000 (16:33 +0200)
committerCosta Tsaousis <costa@tsaousis.gr>
Mon, 21 Nov 2016 14:33:30 +0000 (16:33 +0200)
python.d/python_modules/msg.py

index b835c940459c2836ae1c3c96e8d3624f58766656..74716770c83c4cbf25e7e1c6a36a271c314f90c8 100644 (file)
@@ -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)