274 self.__checkMode('w') |
274 self.__checkMode('w') |
275 tries = 0 |
275 tries = 0 |
276 if not self.wpending: |
276 if not self.wpending: |
277 self.wpending = s |
277 self.wpending = s |
278 elif type(self.wpending) != type(s) or \ |
278 elif type(self.wpending) != type(s) or \ |
279 len(self.wpending) + len(s) > self.maxbuffersize: |
279 len(self.wpending) + len(s) > self.maxbuffersize: |
280 # flush wpending so that different string types are not |
280 # flush wpending so that different string types are not |
281 # concatenated |
281 # concatenated |
282 while self.wpending: |
282 while self.wpending: |
283 # if we have a persistent error in sending the data, an |
283 # if we have a persistent error in sending the data, an |
284 # exception will be raised in __nWrite |
284 # exception will be raised in __nWrite |