]> arthur.barton.de Git - netdata.git/commitdiff
prevent IOError on msg.fatal
authorpaulfantom <paulfantom@gmail.com>
Sun, 14 Aug 2016 10:17:23 +0000 (12:17 +0200)
committerpaulfantom <paulfantom@gmail.com>
Sun, 14 Aug 2016 10:17:23 +0000 (12:17 +0200)
python.d/python_modules/msg.py

index 5ff4e79ba92b7ead2d28bd13f79d5324f4760898..097af08c7f69a61f5cb980034a76755bba1aad0d 100644 (file)
@@ -47,5 +47,7 @@ def fatal(*args):
     Print message on stderr and exit.
     """
     log_msg("FATAL", *args)
-    sys.stdout.write('DISABLE\n')
+    # using sys.stdout causes IOError: Broken Pipe
+    print('DISABLE\n')
+    # sys.stdout.write('DISABLE\n')
     sys.exit(1)
\ No newline at end of file