mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 22:25:39 +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):
|
||||
content = open(filename).read()
|
||||
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
|
||||
return metadata['version']
|
||||
with open(filename) as fh:
|
||||
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
|
||||
return metadata['version']
|
||||
|
||||
|
||||
setup(
|
||||
|
||||
Reference in New Issue
Block a user