"...git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "3ef3a4895e9e13ed38c0b3e0309374ad714e6876"
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: ...@@ -27,7 +27,8 @@ except ImportError:
dir_path = os.path.dirname(os.path.realpath(__file__)) dir_path = os.path.dirname(os.path.realpath(__file__))
if os.path.isfile(os.path.join(dir_path, 'VERSION.txt')): 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', __all__ = ['Dataset', 'Booster',
'train', 'cv', '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