mercurial/util.py
changeset 2096 f5ebe964c6be
parent 2090 eb40db373717
child 2115 fd77b7ee4aac
--- a/mercurial/util.py	Wed Apr 19 11:41:22 2006 -0700
+++ b/mercurial/util.py	Wed Apr 19 11:41:25 2006 -0700
@@ -20,8 +20,12 @@
     '''filter string S through command CMD, returning its output'''
     (pout, pin) = popen2.popen2(cmd, -1, 'b')
     def writer():
-        pin.write(s)
-        pin.close()
+        try:
+            pin.write(s)
+            pin.close()
+        except IOError, inst:
+            if inst.errno != errno.EPIPE:
+                raise
 
     # we should use select instead on UNIX, but this will work on most
     # systems, including Windows