Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
5801460a
Commit
5801460a
authored
Mar 07, 2019
by
Erling Haugstad
Committed by
Nikita Titov
Mar 07, 2019
Browse files
[python] Minor fix: close open file pointer (#2039)
parent
8aa08c4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
python-package/lightgbm/__init__.py
python-package/lightgbm/__init__.py
+2
-1
No files found.
python-package/lightgbm/__init__.py
View file @
5801460a
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment