##// END OF EJS Templates
sigpipe-remote: check for python version earlier in the script...
marmoute -
r48436:b2ed9480 default
parent child Browse files
Show More
@@ -7,7 +7,11 b' import subprocess'
7 import sys
7 import sys
8 import time
8 import time
9
9
10 # 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
10 # we cannot use mercurial.testing as long as python2 is not dropped as the test
11 # will only install the mercurial module for python2 in python2 run
12 if sys.version_info[0] < 3:
13 print('SIGPIPE-HELPER: script should run with Python 3', file=sys.stderr)
14 sys.exit(255)
11
15
12 if isinstance(sys.stdout.buffer, io.BufferedWriter):
16 if isinstance(sys.stdout.buffer, io.BufferedWriter):
13 print('SIGPIPE-HELPER: script need unbuffered output', file=sys.stderr)
17 print('SIGPIPE-HELPER: script need unbuffered output', file=sys.stderr)
@@ -54,10 +58,6 b" def write_file(path, content=b''):"
54
58
55 # end of mercurial.testing content
59 # end of mercurial.testing content
56
60
57 if sys.version_info[0] < 3:
58 print('SIGPIPE-HELPER: script should run with Python 3', file=sys.stderr)
59 sys.exit(255)
60
61
61
62 def sysbytes(s):
62 def sysbytes(s):
63 return s.encode('utf-8')
63 return s.encode('utf-8')
General Comments 0
You need to be logged in to leave comments. Login now