From 5b3ac259ceaf7ad6af7873fcb12f64997c067686 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 24 Jun 2021 11:27:02 +0530 Subject: [PATCH] Fix a resource warning --- kittens/hyperlinked_grep/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kittens/hyperlinked_grep/main.py b/kittens/hyperlinked_grep/main.py index 363295b25..db9c7749e 100644 --- a/kittens/hyperlinked_grep/main.py +++ b/kittens/hyperlinked_grep/main.py @@ -55,8 +55,9 @@ def main() -> None: write(line) except KeyboardInterrupt: p.send_signal(signal.SIGINT) - p.stdout.close() except EOFError: + pass + finally: p.stdout.close() raise SystemExit(p.wait())