Commit 5801460a authored by Erling Haugstad's avatar Erling Haugstad Committed by Nikita Titov
Browse files

[python] Minor fix: close open file pointer (#2039)

parent 8aa08c4a
......@@ -27,7 +27,8 @@ except ImportError:
dir_path = os.path.dirname(os.path.realpath(__file__))
if os.path.isfile(os.path.join(dir_path, 'VERSION.txt')):
__version__ = open(os.path.join(dir_path, 'VERSION.txt')).read().strip()
with open(os.path.join(dir_path, 'VERSION.txt')) as version_file:
__version__ = version_file.read().strip()
__all__ = ['Dataset', 'Booster',
'train', 'cv',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment