Skip to content

Commit

Permalink
handle SpecsConfigurationConflictError similarly to unsat in initial …
Browse files Browse the repository at this point in the history
…frozen solve
  • Loading branch information
msarahan committed May 2, 2019
1 parent 4a8b04d commit e93c5fb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions conda/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
CondaValueError, DirectoryNotACondaEnvironmentError,
DirectoryNotFoundError, DryRunExit, EnvironmentLocationNotFound,
NoBaseEnvironmentError, PackageNotInstalledError, PackagesNotFoundError,
TooManyArgumentsError, UnsatisfiableError)
TooManyArgumentsError, UnsatisfiableError,
SpecsConfigurationConflictError)
from ..gateways.disk.create import mkdir_p
from ..gateways.disk.delete import delete_trash, path_is_clean
from ..misc import clone_env, explicit, touch_nonadmin
Expand Down Expand Up @@ -272,16 +273,18 @@ def install(args, parser, command='install'):
))
raise PackagesNotFoundError(e._formatted_chains, channels_urls)

except (UnsatisfiableError, SystemExit) as e:
except (UnsatisfiableError, SystemExit, SpecsConfigurationConflictError) as e:
# Quick solve with frozen env failed. Try again without that.
if isinstall and args.update_modifier == NULL:
try:
log.info("Initial quick solve with frozen env failed. "
"Unfreezing env and trying again.")
unlink_link_transaction = solver.solve_for_transaction(
deps_modifier=deps_modifier,
update_modifier=args.update_modifier,
force_reinstall=context.force_reinstall or context.force,
)
except (UnsatisfiableError, SystemExit) as e:
except (UnsatisfiableError, SystemExit, SpecsConfigurationConflictError) as e:
# Unsatisfiable package specifications/no such revision/import error
if e.args and 'could not import' in e.args[0]:
raise CondaImportError(text_type(e))
Expand Down

0 comments on commit e93c5fb

Please sign in to comment.