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:
4
setup.py
4
setup.py
@@ -6,8 +6,8 @@ from setuptools import find_packages, setup
|
||||
|
||||
|
||||
def get_version(filename):
|
||||
content = open(filename).read()
|
||||
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
|
||||
with open(filename) as fh:
|
||||
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
|
||||
return metadata['version']
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user