We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7376c0 commit 8e7f236Copy full SHA for 8e7f236
1 file changed
setup.py
@@ -24,9 +24,8 @@
24
25
def get_authors():
26
try:
27
- f = file(os.path.join(PACKAGE_ROOT, "AUTHORS"), "r")
28
- authors = [l.strip(" *\r\n") for l in f if l.strip().startswith("*")]
29
- f.close()
+ with open(os.path.join(PACKAGE_ROOT, "AUTHORS"), "r") as f:
+ authors = [l.strip(" *\r\n") for l in f if l.strip().startswith("*")]
30
except Exception:
31
evalue = sys.exc_info()[1]
32
authors = "[Error: %s]" % evalue
0 commit comments