]> 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:20:58 +0000 (12:20 +0200)
python.d/python_modules/msg.py

index 5ff4e79ba92b7ead2d28bd13f79d5324f4760898..966962d8002d422fb205d7c834ac6c2c17027323 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')
+    # sys.stdout.write('DISABLE\n')
     sys.exit(1)
\ No newline at end of file