Skip to content

Commit 05a47db

Browse files
committed
no need for try except
1 parent 942ef74 commit 05a47db

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

setup.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
from setuptools import setup
22

3-
f = open("README.rst")
4-
try:
5-
try:
6-
readme_content = f.read()
7-
except Exception:
8-
readme_content = ""
9-
finally:
10-
f.close()
3+
readme_content = ''
4+
with open("README.rst") as f:
5+
readme_content = f.read()
116

127
setup(
138
name='restea',

0 commit comments

Comments
 (0)