From 05a47db4bd2a1388121cd14aca6e6a2664104cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walery=20Jad=C5=82owski?= Date: Tue, 20 Feb 2018 15:02:31 +0100 Subject: [PATCH] no need for try except --- setup.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 3cb9430..9a7a316 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,8 @@ from setuptools import setup -f = open("README.rst") -try: - try: - readme_content = f.read() - except Exception: - readme_content = "" -finally: - f.close() +readme_content = '' +with open("README.rst") as f: + readme_content = f.read() setup( name='restea',