From 921b08eab3f4a4bcac33e4c5e90134d3b8cf0383 Mon Sep 17 00:00:00 2001 From: ZeLibertineGamer Date: Mon, 23 May 2016 03:30:59 -0700 Subject: Correct uncaught BrokenPipeError Even if you catch that exception, Python complains. This happens when piping to head or any other program that may exit before vgstash is done. The solution is to simply close stderr when you're done. --- vgstash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vgstash b/vgstash index c1775d6..0983f1c 100755 --- a/vgstash +++ b/vgstash @@ -399,6 +399,8 @@ def main(): # Let'er rip! args = parser.parse_args() args.func(args) + # Oddity in Python needed if you're going to play nice with piping + sys.stderr.close() # Our usual incantation if __name__ == "__main__": -- cgit v1.2.3-54-g00ecf