Browse Source

Update: try for issue #30 works for python >= 2.7.3

Matthew Wang 11 years ago
parent
commit
2d2815a228
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      cdiff.py

+ 2
- 2
cdiff.py View File

252
             self._in.write(line.encode('utf-8'))
252
             self._in.write(line.encode('utf-8'))
253
         except StopIteration:
253
         except StopIteration:
254
             # XXX: close() does not notify select() for EOF event in python
254
             # XXX: close() does not notify select() for EOF event in python
255
-            # 2.x, one of these two interface must be buggy
255
+            # < 2.7.3, one of these two interface must be buggy
256
             #
256
             #
257
             # Sending EOF manually does not work either
257
             # Sending EOF manually does not work either
258
             #
258
             #
273
                 self._forward_line()
273
                 self._forward_line()
274
             else:
274
             else:
275
                 #print('no data to read and istream closed')
275
                 #print('no data to read and istream closed')
276
-                # XXX: `close` or `select` seems buggy in python 2.x, select
276
+                # XXX: `close` or `select` seems buggy in python < 2.7.3, select
277
                 # does not tell ready event on _translator.stdout anymore once
277
                 # does not tell ready event on _translator.stdout anymore once
278
                 # the stdin is closed.  Just add a timeout here to detect, when
278
                 # the stdin is closed.  Just add a timeout here to detect, when
279
                 # that happen the remaining in output stream will be discarded
279
                 # that happen the remaining in output stream will be discarded