Fix a resource warning

This commit is contained in:
Kovid Goyal 2021-06-24 11:27:02 +05:30
parent ce50043048
commit 5b3ac259ce
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -55,8 +55,9 @@ def main() -> None:
write(line) write(line)
except KeyboardInterrupt: except KeyboardInterrupt:
p.send_signal(signal.SIGINT) p.send_signal(signal.SIGINT)
p.stdout.close()
except EOFError: except EOFError:
pass
finally:
p.stdout.close() p.stdout.close()
raise SystemExit(p.wait()) raise SystemExit(p.wait())