aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-12-08 19:06:41 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-12-08 19:06:41 -0500
commit5a662289e866fb9bac77736ffede2fca05c79367 (patch)
tree65af403b35987c89f8f368d46bd53fcc28ade566 /setuptools/package_index.py
parent59e47d76244bf25a9c385800328394e97be74b48 (diff)
downloadexternal_python_setuptools-5a662289e866fb9bac77736ffede2fca05c79367.tar.gz
external_python_setuptools-5a662289e866fb9bac77736ffede2fca05c79367.tar.bz2
external_python_setuptools-5a662289e866fb9bac77736ffede2fca05c79367.zip
Extract variable
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 330b8391..1c156f07 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -1031,11 +1031,12 @@ def local_open(url):
elif path.endswith('/') and os.path.isdir(filename):
files = []
for f in os.listdir(filename):
+ filepath = os.path.join(filename, f)
if f == 'index.html':
- with open(os.path.join(filename, f), 'r') as fp:
+ with open(filepath, 'r') as fp:
body = fp.read()
break
- elif os.path.isdir(os.path.join(filename, f)):
+ elif os.path.isdir(filepath):
f += '/'
files.append('<a href="{name}">{name}</a>'.format(name=f))
else: