From d8876b0b7394062e644f29f1903fb38fc1145143 Mon Sep 17 00:00:00 2001 From: chanis Date: Tue, 20 Sep 2016 00:43:36 +0800 Subject: [PATCH] [python-package] modify __init__.py (#1587) * Update Makefile * Update Makefile * modify __init__.py --- python-package/xgboost/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-package/xgboost/__init__.py b/python-package/xgboost/__init__.py index 2abd10eed..06086444e 100644 --- a/python-package/xgboost/__init__.py +++ b/python-package/xgboost/__init__.py @@ -18,7 +18,8 @@ except ImportError: pass VERSION_FILE = os.path.join(os.path.dirname(__file__), 'VERSION') -__version__ = open(VERSION_FILE).read().strip() +with open(VERSION_FILE) as f: + __version__ = f.read().strip() __all__ = ['DMatrix', 'Booster', 'train', 'cv',