summaryrefslogtreecommitdiff
path: root/src/click
diff options
context:
space:
mode:
authorJay Crotts <crotts.jay@gmail.com>2021-08-12 22:29:19 -0500
committerDavid Lord <davidism@gmail.com>2021-08-14 05:24:22 -0700
commite892389f540e07c3f4a7e4acaf0a6b0ba4f7161a (patch)
tree000db608348d5c70e3ab8dba9bb9753bdf5edb88 /src/click
parent9f620f7207704ec5f33cc52c22b9ea6402ca5a63 (diff)
downloadclick-e892389f540e07c3f4a7e4acaf0a6b0ba4f7161a.tar.gz
Always close file descriptor to tempfilepager.
Diffstat (limited to 'src/click')
-rw-r--r--src/click/_termui_impl.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py
index cf03e90..c860101 100644
--- a/src/click/_termui_impl.py
+++ b/src/click/_termui_impl.py
@@ -437,8 +437,7 @@ def _tempfilepager(
try:
os.system(f'{cmd} "{filename}"')
finally:
- if WIN:
- os.close(fd)
+ os.close(fd)
os.unlink(filename)