diff options
author | ZeLibertineGamer <zlg@zlg.space> | 2016-05-23 03:30:59 -0700 |
---|---|---|
committer | Ze Libertine Gamer <zlg@zlg.space> | 2016-05-23 03:30:59 -0700 |
commit | 921b08eab3f4a4bcac33e4c5e90134d3b8cf0383 (patch) | |
tree | b1ff5a73eca412dbc2ee69bfb0a20b781a19f800 | |
parent | Initial commit (diff) | |
download | vgstash-921b08eab3f4a4bcac33e4c5e90134d3b8cf0383.tar.gz vgstash-921b08eab3f4a4bcac33e4c5e90134d3b8cf0383.tar.bz2 vgstash-921b08eab3f4a4bcac33e4c5e90134d3b8cf0383.tar.xz vgstash-921b08eab3f4a4bcac33e4c5e90134d3b8cf0383.zip |
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.
Diffstat (limited to '')
-rwxr-xr-x | vgstash | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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__": |