Skip to content

Commit

Permalink
Simplify conda install logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Jul 27, 2016
1 parent 06e409a commit 2a5b043
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/galaxy/tools/deps/resolvers/conda.py
Expand Up @@ -135,7 +135,7 @@ def resolve(self, name, version, type, **kwds):
return NullDependency(version=version, name=name)

if not is_installed and self.auto_install:
is_installed = self.install_dependency(name, version, type)
is_installed = self.install_dependency(name=name, version=version, type=type)

if not is_installed:
return NullDependency(version=version, name=name)
Expand Down Expand Up @@ -190,16 +190,14 @@ def install_dependency(self, name, version, type, **kwds):
return_code = install_conda_target(conda_target, conda_context=self.conda_context)
if return_code != 0:
is_installed = False
log.debug("Remove failed conda install of {}, version '{}'".format(name, version))
cleanup_failed_install(conda_target, conda_context=self.conda_context)
else:
# Recheck if installed
is_installed = is_conda_target_installed(
conda_target, conda_context=self.conda_context, verbose_install_check=self.verbose_install_check
)
if not is_installed:
log.debug("Remove failed conda install of {}, version '{}'".format(name, version))
cleanup_failed_install(conda_target, conda_context=self.conda_context)
if not is_installed:
log.debug("Removing failed conda install of {}, version '{}'".format(name, version))
cleanup_failed_install(conda_target, conda_context=self.conda_context)

return is_installed

Expand Down

0 comments on commit 2a5b043

Please sign in to comment.