##// END OF EJS Templates
py3: conditionalize initialization of stdio flags...
Yuya Nishihara -
r36654:c263c684 default
parent child Browse files
Show More
@@ -105,12 +105,15 b' def run():'
105 # change the status code and move on.
105 # change the status code and move on.
106 except IOError:
106 except IOError:
107 status = -1
107 status = -1
108
109 sys.exit(status & 255)
108 sys.exit(status & 255)
110
109
111 def _initstdio():
110 if pycompat.ispy3:
112 for fp in (sys.stdin, sys.stdout, sys.stderr):
111 def _initstdio():
113 util.setbinary(fp)
112 pass
113 else:
114 def _initstdio():
115 for fp in (sys.stdin, sys.stdout, sys.stderr):
116 util.setbinary(fp)
114
117
115 def _getsimilar(symbols, value):
118 def _getsimilar(symbols, value):
116 sim = lambda x: difflib.SequenceMatcher(None, value, x).ratio()
119 sim = lambda x: difflib.SequenceMatcher(None, value, x).ratio()
General Comments 0
You need to be logged in to leave comments. Login now