Don't choke on broken pipes
    
        | author | 
        Steve Losh <steve@stevelosh.com> | 
    
    
        | date | 
        Fri, 06 Oct 2017 22:15:54 -0400 | 
    
    
    
        | parents | 
        e45034370c06 
 | 
    
    
        | children | 
        643afa3557f7
 | 
    
    
        | branches/tags | 
        (none) | 
    
    
        | files | 
        ffind  | 
    
Changes
    
--- a/ffind	Mon Oct 31 13:58:36 2016 +0000
+++ b/ffind	Fri Oct 06 22:15:54 2017 -0400
@@ -8,12 +8,13 @@
 #
 #                         The friendlier file finder.
 
-import time
+import errno
+import optparse
 import os
-import optparse
+import re
 import string
 import sys
-import re
+import time
 from optparse import OptionParser, OptionGroup
 
 
@@ -882,4 +883,11 @@
         sys.stdout.write('\n')
         sys.exit(130)
     signal.signal(signal.SIGINT, sigint_handler)
-    main()
+
+    try:
+        main()
+    except IOError as e:
+        if e.errno != errno.EPIPE:
+            raise
+        else:
+            pass