summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-11-21 15:48:33 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-11-21 15:48:33 (GMT)
commit6ef966e1ad334d78bd555fb720b606bf3b97aef9 (patch)
tree0c532c191c6e2417c59780d822faf868306326a2 /Lib/tempfile.py
parent2100798b8c2741347cb1bd4bf545f706574f523e (diff)
downloadcpython-6ef966e1ad334d78bd555fb720b606bf3b97aef9.zip
cpython-6ef966e1ad334d78bd555fb720b606bf3b97aef9.tar.gz
cpython-6ef966e1ad334d78bd555fb720b606bf3b97aef9.tar.bz2
_TemporaryFileWrapper: changed self.close_called to a proper bool.
Diffstat (limited to 'Lib/tempfile.py')
-rw-r--r--Lib/tempfile.py4
1 files 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)