浏览代码

revert 29c9e1 for python3 work

Matthew Wang 12 年前
父节点
当前提交
457365aa78
共有 1 个文件被更改,包括 2 次插入7 次删除
  1. 2
    7
      src/cdiff.py

+ 2
- 7
src/cdiff.py 查看文件

@@ -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()