Skip to content

Commit

Permalink
Removes redundant upgrade=(upgrade or upgrade_recursive). refs pypa…
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Nov 20, 2012
1 parent 931e307 commit 26bcccb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pip/commands/install.py
Expand Up @@ -221,19 +221,21 @@ def run(self, options, args):

finder = self._build_package_finder(options, index_urls)

upgrade = options.upgrade or options.upgrade_recursive

requirement_set = RequirementSet(
build_dir=options.build_dir,
src_dir=options.src_dir,
download_dir=options.download_dir,
download_cache=options.download_cache,
upgrade=options.upgrade or options.upgrade_recursive,
upgrade=upgrade,
upgrade_recursive=options.upgrade_recursive,
as_egg=options.as_egg,
ignore_installed=options.ignore_installed,
ignore_dependencies=options.ignore_dependencies,
force_reinstall=options.force_reinstall,
use_user_site=options.use_user_site)
upgrade = options.upgrade or options.upgrade_recursive

for name in args:
requirement_set.add_requirement(
InstallRequirement.from_line(name, None, upgrade=upgrade))
Expand Down
2 changes: 1 addition & 1 deletion pip/req.py
Expand Up @@ -820,7 +820,7 @@ def __init__(self, build_dir, src_dir, download_dir, download_cache=None,
self.src_dir = src_dir
self.download_dir = download_dir
self.download_cache = download_cache
self.upgrade = upgrade or upgrade_recursive
self.upgrade = upgrade
self.upgrade_recursive = upgrade_recursive
self.ignore_installed = ignore_installed
self.force_reinstall = force_reinstall
Expand Down

0 comments on commit 26bcccb

Please sign in to comment.