_TemporaryFileWrapper: changed self.close_called to a proper bool.

This commit is contained in:
Tim Peters 2002-11-21 15:48:33 +00:00
parent 2100798b8c
commit 6ef966e1ad

View File

@ -351,7 +351,7 @@ class _TemporaryFileWrapper:
def __init__(self, file, name): def __init__(self, file, name):
self.file = file self.file = file
self.name = name self.name = name
self.close_called = 0 self.close_called = False
def __getattr__(self, name): def __getattr__(self, name):
file = self.__dict__['file'] file = self.__dict__['file']
@ -374,7 +374,7 @@ class _TemporaryFileWrapper:
def close(self): def close(self):
if not self.close_called: if not self.close_called:
self.close_called = 1 self.close_called = True
self.file.close() self.file.close()
self.unlink(self.name) self.unlink(self.name)