From 66c2e8ff52a0cea908bbb0d6c4db139c5e35d8ef Mon Sep 17 00:00:00 2001 From: Seppo Yli-Olli Date: Fri, 29 Aug 2014 19:18:52 +0300 Subject: [PATCH] Drop usage of obsolete function "file" Also use context manager --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0ec7fe7d3..df9c712f6 100644 --- a/setup.py +++ b/setup.py @@ -70,8 +70,8 @@ def findPackages(path, dataExclude=[]): package_data[module] = acc return packages, package_data - -long_description = file(os.path.join(pdir(), "README.txt")).read() +with open(os.path.join(pdir(), "README.txt")) as f: + long_description = f.read() packages, package_data = findPackages("libmproxy") setup( name = "mitmproxy",