From 6ef966e1ad334d78bd555fb720b606bf3b97aef9 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Thu, 21 Nov 2002 15:48:33 +0000 Subject: _TemporaryFileWrapper: changed self.close_called to a proper bool. --- Lib/tempfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/tempfile.py b/Lib/tempfile.py index 692bea5..2ad525e 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -351,7 +351,7 @@ class _TemporaryFileWrapper: def __init__(self, file, name): self.file = file self.name = name - self.close_called = 0 + self.close_called = False def __getattr__(self, name): file = self.__dict__['file'] @@ -374,7 +374,7 @@ class _TemporaryFileWrapper: def close(self): if not self.close_called: - self.close_called = 1 + self.close_called = True self.file.close() self.unlink(self.name) -- cgit v0.12