]> granicus.if.org Git - python/commitdiff
When piping output into a pager like "less", quiting the pager before
authorFred Drake <fdrake@acm.org>
Thu, 14 Aug 2003 15:52:33 +0000 (15:52 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 14 Aug 2003 15:52:33 +0000 (15:52 +0000)
the output was consumed would cause and exception to be raise in
logmerge; suppress this specific error, because it's not helpful.

Tools/scripts/logmerge.py

index 977324d4bf43045dc86acaf9993660ba70caf893..54d1676a43d74f3081c6861e94124ce54a208ee2 100755 (executable)
@@ -34,7 +34,7 @@ XXX This code was created by reverse engineering CVS 1.9 and RCS 5.7
 from their output.
 """
 
-import os, sys, getopt, re
+import os, sys, errno, getopt, re
 
 sep1 = '='*77 + '\n'                    # file separator
 sep2 = '-'*28 + '\n'                    # revision separator
@@ -177,4 +177,8 @@ def format_output(database):
         prev.append((date, working_file, rev, author))
         prevtext = text
 
-main()
+try:
+    main()
+except IOError, e:
+    if e.errno != errno.EPIPE:
+        raise