##// END OF EJS Templates
windows: remove write throttling support...
Gregory Szorc -
r49754:563eb25e default
parent child Browse files
Show More
@@ -225,7 +225,6 b' class winstdout(object):'
225
225
226 def __init__(self, fp):
226 def __init__(self, fp):
227 self.fp = fp
227 self.fp = fp
228 self.throttle = not pycompat.ispy3 and _isatty(fp)
229
228
230 def __getattr__(self, key):
229 def __getattr__(self, key):
231 return getattr(self.fp, key)
230 return getattr(self.fp, key)
@@ -238,17 +237,7 b' class winstdout(object):'
238
237
239 def write(self, s):
238 def write(self, s):
240 try:
239 try:
241 if not self.throttle:
240 return self.fp.write(s)
242 return self.fp.write(s)
243 # This is workaround for "Not enough space" error on
244 # writing large size of data to console.
245 limit = 16000
246 l = len(s)
247 start = 0
248 while start < l:
249 end = start + limit
250 self.fp.write(s[start:end])
251 start = end
252 except IOError as inst:
241 except IOError as inst:
253 if inst.errno != 0 and not win32.lasterrorwaspipeerror(inst):
242 if inst.errno != 0 and not win32.lasterrorwaspipeerror(inst):
254 raise
243 raise
General Comments 0
You need to be logged in to leave comments. Login now