mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 14:15:41 +00:00
setup: Explicitly close file
This commit is contained in:
6
setup.py
6
setup.py
@@ -6,9 +6,9 @@ from setuptools import find_packages, setup
|
|||||||
|
|
||||||
|
|
||||||
def get_version(filename):
|
def get_version(filename):
|
||||||
content = open(filename).read()
|
with open(filename) as fh:
|
||||||
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
|
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
|
||||||
return metadata['version']
|
return metadata['version']
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|||||||
Reference in New Issue
Block a user