2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-15 15:53:36 +00:00

Fixing bug with dangling file handle when setting __version__

This change fixes a bug whereby a file handle was left unclosed after
being used to dynamically set __version__.
This commit is contained in:
Peter Hamilton
2015-06-25 14:27:31 -04:00
parent 093ef072c1
commit e371273457
2 changed files with 8 additions and 4 deletions

View File

@@ -16,9 +16,11 @@
import os
import setuptools
version = os.path.join(os.path.dirname(
# Dynamically set __version__
version_path = os.path.join(os.path.dirname(
os.path.realpath(__file__)), 'kmip', 'version.py')
exec(open(version).read())
with open(version_path, 'r') as version_file:
exec(version_file.read())
setuptools.setup(
name='PyKMIP',