summaryrefslogtreecommitdiffstats
path: root/Lib/chunk.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/chunk.py')
-rw-r--r--Lib/chunk.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/chunk.py b/Lib/chunk.py
index dc90a75..98187b2 100644
--- a/Lib/chunk.py
+++ b/Lib/chunk.py
@@ -85,8 +85,10 @@ class Chunk:
def close(self):
if not self.closed:
- self.skip()
- self.closed = True
+ try:
+ self.skip()
+ finally:
+ self.closed = True
def isatty(self):
if self.closed: