Created
March 24, 2011 22:17
-
-
Save hltbra/886020 to your computer and use it in GitHub Desktop.
Kelsey Hightower's patch to issue #34 (in github) -- Issue when trying to remove from list twice.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch -- Bitbucket.org | |
# Project pip | |
# URL https://bitbucket.org/khightower/pip/overview | |
# User Kelsey Hightower <kelsey.hightower@gmail.com> | |
# Date 1296943694 18000 | |
# Node ID 384c3784a22c449e80b58d5ba159f637e84f5cc7 | |
# Parent 0542924d062debf8a4b9a8c83da8241411955139 | |
Fixing #205 -- Issue when trying to remove from list twice. | |
--- a/pip/req.py | |
+++ b/pip/req.py | |
@@ -269,12 +269,13 @@ execfile(__file__) | |
if dir in dirs: | |
dirs.remove(dir) | |
for dir in dirs: | |
- # Don't search in anything that looks like a virtualenv environment | |
- if (os.path.exists(os.path.join(root, dir, 'bin', 'python')) | |
- or os.path.exists(os.path.join(root, dir, 'Scripts', 'Python.exe'))): | |
- dirs.remove(dir) | |
- # Also don't search through tests | |
- if dir == 'test' or dir == 'tests': | |
+ # Don't search in anything that looks like a | |
+ # virtualenv environment or test suite. | |
+ if (os.path.exists(os.path.join( | |
+ root, dir, 'bin', 'python')) or | |
+ os.path.exists(os.path.join( | |
+ root, dir, 'Scripts', 'Python.exe')) or | |
+ dir == 'test' or dir == 'tests'): | |
dirs.remove(dir) | |
filenames.extend([os.path.join(root, dir) | |
for dir in dirs]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment