From b9396c0b9053d85bdf3b28a7dc6660825c822354 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 15 Jun 2019 18:10:40 +0200 Subject: Move .close() to a better spot in _leave_file() --- kconfiglib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kconfiglib.py b/kconfiglib.py index bfcc567..2501a57 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2095,11 +2095,10 @@ class Kconfig(object): # Returns from a Kconfig file to the file that sourced it. See # _enter_file(). - # __self__ fetches the 'file' object for the method - self._readline.__self__.close() # Restore location from parent Kconfig file self._filename, self._linenr = self._include_path[-1] # Restore include path and 'file' object + self._readline.__self__.close() # __self__ fetches the 'file' object self._include_path, self._readline = self._filestack.pop() def _next_line(self): -- cgit v1.2.3