##// END OF EJS Templates
sigpipe-remote: verify the script is IO are unbuffered...
marmoute -
r48417:d5fc1b59 default
parent child Browse files
Show More
@@ -1,6 +1,7
1 1 #!/usr/bin/env python3
2 2 from __future__ import print_function
3 3
4 import io
4 5 import os
5 6 import subprocess
6 7 import sys
@@ -9,6 +10,10 import time
9 10
10 11 # we cannot use mercurial.testing as long as python2 is not dropped as the test will only install the mercurial module for python2 in python2 run
11 12
13 if isinstance(sys.stdout.buffer, io.BufferedWriter):
14 print('SIGPIPE-HELPER: script need unbuffered output', file=sys.stderr)
15 sys.exit(255)
16
12 17 DEBUG_FILE = os.environ.get('SIGPIPE_REMOTE_DEBUG_FILE')
13 18 if DEBUG_FILE is None:
14 19 debug_stream = sys.stderr.buffer
General Comments 0
You need to be logged in to leave comments. Login now