Repository: conda/conda

Issue:
Outdated error information regarding license package when running conda info
<!--
Hi!  Read this; it's important.

This is an issue tracker for conda -- the package manager.  File feature requests
for conda here, as well as bug reports about something conda has messed up.

If your issue is a bug report or feature request for:
  * a specific conda package from Anaconda ('defaults' channel):
      ==> file at https://github.com/ContinuumIO/anaconda-issues
  * a specific conda package from conda-forge:
      ==> file at the corresponding feedstock under https://github.com/conda-forge
  * repo.anaconda.com access and service:
      ==> file at https://github.com/ContinuumIO/anaconda-issues
  * anaconda.org access and service:
      ==> file at https://anaconda.org/contact/report
  * commands under 'conda build':
      ==> file at https://github.com/conda/conda-build
  * commands under 'conda env':
      ==> please file it here!
  * all other conda commands that start with 'conda':
      ==> please file it here!

If you continue on, and especially if you are submitting a bug report,

   **please include all requested information below.**

If a maintainer determines the information is required to understand 
your issue, and if it is not provided, your issue may be
closed automatically.

-->

**I'm submitting a...**
  - [X] bug report
  - [ ] feature request


## Current Behavior
<!-- What actually happens?
     If you want to include console output, please use "Steps to Reproduce" below. -->

### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
     Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
`conda info -a` shows the following at the end:
```
WARNING: could not import _license.show_info
# try:
# $ conda install -n root _license
```


## Expected Behavior
<!-- What do you think should happen? -->
`root` has been renamed to `base` so it should say `conda install -n base _license`.


Outdated error information regarding license package when running conda info
<!--
Hi!  Read this; it's important.

This is an issue tracker for conda -- the package manager.  File feature requests
for conda here, as well as bug reports about something conda has messed up.

If your issue is a bug report or feature request for:
  * a specific conda package from Anaconda ('defaults' channel):
      ==> file at https://github.com/ContinuumIO/anaconda-issues
  * a specific conda package from conda-forge:
      ==> file at the corresponding feedstock under https://github.com/conda-forge
  * repo.anaconda.com access and service:
      ==> file at https://github.com/ContinuumIO/anaconda-issues
  * anaconda.org access and service:
      ==> file at https://anaconda.org/contact/report
  * commands under 'conda build':
      ==> file at https://github.com/conda/conda-build
  * commands under 'conda env':
      ==> please file it here!
  * all other conda commands that start with 'conda':
      ==> please file it here!

If you continue on, and especially if you are submitting a bug report,

   **please include all requested information below.**

If a maintainer determines the information is required to understand 
your issue, and if it is not provided, your issue may be
closed automatically.

-->

**I'm submitting a...**
  - [X] bug report
  - [ ] feature request


## Current Behavior
<!-- What actually happens?
     If you want to include console output, please use "Steps to Reproduce" below. -->

### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
     Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
`conda info -a` shows the following at the end:
```
WARNING: could not import _license.show_info
# try:
# $ conda install -n root _license
```


## Expected Behavior
<!-- What do you think should happen? -->
`root` has been renamed to `base` so it should say `conda install -n base _license`.




Discussion:
We need to remove this `_license` stuff altogether.  It no longer applies after Anaconda 5.0 and the `pkgs/main` channel.
We need to remove this `_license` stuff altogether.  It no longer applies after Anaconda 5.0 and the `pkgs/main` channel.

Resolving patch:
diff --git a/conda/cli/conda_argparse.py b/conda/cli/conda_argparse.py
--- a/conda/cli/conda_argparse.py
+++ b/conda/cli/conda_argparse.py
@@ -288,7 +288,7 @@ def configure_parser_info(sub_parsers):
     p.add_argument(
         '-l', "--license",
         action="store_true",
-        help="Display information about the local conda licenses list.",
+        help=SUPPRESS,
     )
     p.add_argument(
         '-s', "--system",
diff --git a/conda/cli/main_info.py b/conda/cli/main_info.py
--- a/conda/cli/main_info.py
+++ b/conda/cli/main_info.py
@@ -11,7 +11,6 @@
 from os.path import exists, expanduser, isfile, join
 import re
 import sys
-from textwrap import dedent
 
 from .common import print_envs_list, stdout_json
 from .. import CONDA_PACKAGE_ROOT, __version__ as conda_version
@@ -296,7 +295,7 @@ def execute(args, parser):
             print(json.dumps({"channels": context.channels}))
         return 0
 
-    options = 'envs', 'system', 'license'
+    options = 'envs', 'system'
 
     if args.all or context.json:
         for option in options:
@@ -334,17 +333,5 @@ def execute(args, parser):
                 print("%s: %s" % (name, value))
             print()
 
-    if args.license and not context.json:
-        try:
-            from _license import show_info
-            show_info()  # pragma: no cover
-        except ImportError:
-            print(dedent("""
-                WARNING: could not import _license.show_info
-                # try:
-                # $ conda install -n root _license"""))
-        except Exception as e:  # pragma: no cover
-            log.warn('%r', e)
-
     if context.json:
         stdout_json(info_dict)


Test patch: