diff options
Diffstat (limited to 'Lib/fileinput.py')
-rw-r--r-- | Lib/fileinput.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/fileinput.py b/Lib/fileinput.py index 8af4a57f02..af810d1d73 100644 --- a/Lib/fileinput.py +++ b/Lib/fileinput.py @@ -277,24 +277,24 @@ class FileInput: def nextfile(self): savestdout = self._savestdout - self._savestdout = 0 + self._savestdout = None if savestdout: sys.stdout = savestdout output = self._output - self._output = 0 + self._output = None try: if output: output.close() finally: file = self._file - self._file = 0 + self._file = None try: if file and not self._isstdin: file.close() finally: backupfilename = self._backupfilename - self._backupfilename = 0 + self._backupfilename = None if backupfilename and not self._backup: try: os.unlink(backupfilename) except OSError: pass |