[diffoscope] 01/01: Mask EPIPE to avoid ugly tracebacks when eg. prematurely terminating $PAGER

Chris Lamb chris at chris-lamb.co.uk
Sun Jul 17 14:08:17 CEST 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit 32c32dc16ddb94c5a11fbb88147ebd5e2d20197e
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Jul 17 14:08:05 2016 +0200

    Mask EPIPE to avoid ugly tracebacks when eg. prematurely terminating $PAGER
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/__main__.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/diffoscope/__main__.py b/diffoscope/__main__.py
index a3b1510..50b9928 100644
--- a/diffoscope/__main__.py
+++ b/diffoscope/__main__.py
@@ -200,6 +200,8 @@ def main(args=None):
     except KeyboardInterrupt:
         logger.info('Keyboard Interrupt')
         sys.exit(2)
+    except BrokenPipeError:
+        sys.exit(2)
     except Exception:
         traceback.print_exc()
         if parsed_args and parsed_args.debugger:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list