Browse Source

revert 29c9e1 for python3 work

Matthew Wang 12 years ago
parent
commit
457365aa78
1 changed files with 2 additions and 7 deletions
  1. 2
    7
      src/cdiff.py

+ 2
- 7
src/cdiff.py View File

@@ -16,7 +16,6 @@ if sys.hexversion < 0x02050000:
16 16
 
17 17
 import os
18 18
 import re
19
-import errno
20 19
 import difflib
21 20
 
22 21
 
@@ -493,12 +492,8 @@ if __name__ == '__main__':
493 492
         # args stolen fron git source: github.com/git/git/blob/master/pager.c
494 493
         pager = subprocess.Popen(['less', '-FRSXK'],
495 494
                 stdin=subprocess.PIPE, stdout=sys.stdout)
496
-        try:
497
-            for line in color_diff:
498
-                pager.stdin.write(line)
499
-        except IOError as e:
500
-            if e.errno == errno.EPIPE:
501
-                pass
495
+        for line in color_diff:
496
+            pager.stdin.write(line)
502 497
 
503 498
         pager.stdin.close()
504 499
         pager.wait()