prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Channels in centrally installed .condarc file are being ignored in conda 4.3.4
  Hi, I am testing a centrally installed Anaconda setup with Anaconda installed under `C:\Program Files\Anaconda3`. I have a condarc file under `C:\Program Files\Anaconda3\.condarc`.
  
  When I run `conda info` it tells me that my config file is under the correct location.
  
      config file : C:\Program Files\Anaconda3\.condarc
  
  I have configured a few custom channels in this `.condarc` file, e.g.:
  
      channels:
        - http://some.internal/url
  
  I can also use `conda config --system --add channels http://some.internal/url` to set this value and conda tells me that channels already contains this value.
  
  But when I run `conda config --system --show`, the list of channels is always set to:
  
      channels:
        - defaults
  
  It seems that the list of channels in the central `.condarc` file is completely ignored and always replaced by `defaults`. I have also tried to set the list of `default_channels` in the central `.condarc` file but without success.
  
  Using conda 4.3.4 on win-64.
  
  
  </issue>
  <code>
  [start of conda/__init__.py]
  1 # (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io
  2 # All Rights Reserved
  3 #
  4 # conda is distributed under the terms of the BSD 3-clause license.
  5 # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
  6 """OS-agnostic, system-level binary package manager."""
  7 from __future__ import absolute_import, division, print_function, unicode_literals
  8 
  9 from os.path import dirname
  10 
  11 from ._vendor.auxlib.packaging import get_version
  12 from .common.compat import iteritems, text_type
  13 
  14 __all__ = [
  15     "__name__", "__version__", "__author__",
  16     "__email__", "__license__", "__copyright__",
  17     "__summary__", "__url__",
  18 ]
  19 
  20 __name__ = "conda"
  21 __version__ = get_version(__file__)
  22 __author__ = "Continuum Analytics, Inc."
  23 __email__ = "conda@continuum.io"
  24 __license__ = "BSD"
  25 __summary__ = __doc__
  26 __url__ = "https://github.com/conda/conda"
  27 
  28 CONDA_PACKAGE_ROOT = dirname(__file__)
  29 
  30 
  31 class CondaError(Exception):
  32     def __init__(self, message, **kwargs):
  33         self.message = message
  34         self._kwargs = kwargs
  35         super(CondaError, self).__init__(message)
  36 
  37     def __repr__(self):
  38         return '%s: %s\n' % (self.__class__.__name__, text_type(self))
  39 
  40     def __str__(self):
  41         return text_type(self.message % self._kwargs)
  42 
  43     def dump_map(self):
  44         result = dict((k, v) for k, v in iteritems(vars(self)) if not k.startswith('_'))
  45         result.update(exception_type=text_type(type(self)),
  46                       exception_name=self.__class__.__name__,
  47                       message=text_type(self),
  48                       error=repr(self),
  49                       **self._kwargs)
  50         return result
  51 
  52 
  53 class CondaMultiError(CondaError):
  54 
  55     def __init__(self, errors):
  56         self.errors = errors
  57         super(CondaError, self).__init__(None)
  58 
  59     def __repr__(self):
  60         return '\n'.join(repr(e) for e in self.errors) + '\n'
  61 
  62     def __str__(self):
  63         return '\n'.join(text_type(e) for e in self.errors) + '\n'
  64 
  65     def dump_map(self):
  66         return dict(exception_type=text_type(type(self)),
  67                     exception_name=self.__class__.__name__,
  68                     errors=tuple(error.dump_map() for error in self.errors),
  69                     error="Multiple Errors Encountered.",
  70                     )
  71 
  72 
  73 class CondaExitZero(CondaError):
  74     pass
  75
  [end of conda/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/conda/__init__.py b/conda/__init__.py
  --- a/conda/__init__.py
  +++ b/conda/__init__.py
  @@ -6,7 +6,9 @@
   """OS-agnostic, system-level binary package manager."""
   from __future__ import absolute_import, division, print_function, unicode_literals
   
  +import os
   from os.path import dirname
  +import sys
   
   from ._vendor.auxlib.packaging import get_version
   from .common.compat import iteritems, text_type
  @@ -25,6 +27,10 @@
   __summary__ = __doc__
   __url__ = "https://github.com/conda/conda"
   
  +
  +if os.getenv('CONDA_ROOT') is None:
  +    os.environ['CONDA_ROOT'] = sys.prefix
  +
   CONDA_PACKAGE_ROOT = dirname(__file__)
  
verification_info: {"golden_diff": "diff --git a/conda/__init__.py b/conda/__init__.py\n--- a/conda/__init__.py\n+++ b/conda/__init__.py\n@@ -6,7 +6,9 @@\n \"\"\"OS-agnostic, system-level binary package manager.\"\"\"\n from __future__ import absolute_import, division, print_function, unicode_literals\n \n+import os\n from os.path import dirname\n+import sys\n \n from ._vendor.auxlib.packaging import get_version\n from .common.compat import iteritems, text_type\n@@ -25,6 +27,10 @@\n __summary__ = __doc__\n __url__ = \"https://github.com/conda/conda\"\n \n+\n+if os.getenv('CONDA_ROOT') is None:\n+    os.environ['CONDA_ROOT'] = sys.prefix\n+\n CONDA_PACKAGE_ROOT = dirname(__file__)\n", "issue": "Channels in centrally installed .condarc file are being ignored in conda 4.3.4\nHi, I am testing a centrally installed Anaconda setup with Anaconda installed under `C:\\Program Files\\Anaconda3`. I have a condarc file under `C:\\Program Files\\Anaconda3\\.condarc`.\r\n\r\nWhen I run `conda info` it tells me that my config file is under the correct location.\r\n\r\n    config file : C:\\Program Files\\Anaconda3\\.condarc\r\n\r\nI have configured a few custom channels in this `.condarc` file, e.g.:\r\n\r\n    channels:\r\n      - http://some.internal/url\r\n\r\nI can also use `conda config --system --add channels http://some.internal/url` to set this value and conda tells me that channels already contains this value.\r\n\r\nBut when I run `conda config --system --show`, the list of channels is always set to:\r\n\r\n    channels:\r\n      - defaults\r\n\r\nIt seems that the list of channels in the central `.condarc` file is completely ignored and always replaced by `defaults`. I have also tried to set the list of `default_channels` in the central `.condarc` file but without success.\r\n\r\nUsing conda 4.3.4 on win-64.\r\n\n", "before_files": [{"content": "# (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\"OS-agnostic, system-level binary package manager.\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom os.path import dirname\n\nfrom ._vendor.auxlib.packaging import get_version\nfrom .common.compat import iteritems, text_type\n\n__all__ = [\n    \"__name__\", \"__version__\", \"__author__\",\n    \"__email__\", \"__license__\", \"__copyright__\",\n    \"__summary__\", \"__url__\",\n]\n\n__name__ = \"conda\"\n__version__ = get_version(__file__)\n__author__ = \"Continuum Analytics, Inc.\"\n__email__ = \"conda@continuum.io\"\n__license__ = \"BSD\"\n__summary__ = __doc__\n__url__ = \"https://github.com/conda/conda\"\n\nCONDA_PACKAGE_ROOT = dirname(__file__)\n\n\nclass CondaError(Exception):\n    def __init__(self, message, **kwargs):\n        self.message = message\n        self._kwargs = kwargs\n        super(CondaError, self).__init__(message)\n\n    def __repr__(self):\n        return '%s: %s\\n' % (self.__class__.__name__, text_type(self))\n\n    def __str__(self):\n        return text_type(self.message % self._kwargs)\n\n    def dump_map(self):\n        result = dict((k, v) for k, v in iteritems(vars(self)) if not k.startswith('_'))\n        result.update(exception_type=text_type(type(self)),\n                      exception_name=self.__class__.__name__,\n                      message=text_type(self),\n                      error=repr(self),\n                      **self._kwargs)\n        return result\n\n\nclass CondaMultiError(CondaError):\n\n    def __init__(self, errors):\n        self.errors = errors\n        super(CondaError, self).__init__(None)\n\n    def __repr__(self):\n        return '\\n'.join(repr(e) for e in self.errors) + '\\n'\n\n    def __str__(self):\n        return '\\n'.join(text_type(e) for e in self.errors) + '\\n'\n\n    def dump_map(self):\n        return dict(exception_type=text_type(type(self)),\n                    exception_name=self.__class__.__name__,\n                    errors=tuple(error.dump_map() for error in self.errors),\n                    error=\"Multiple Errors Encountered.\",\n                    )\n\n\nclass CondaExitZero(CondaError):\n    pass\n", "path": "conda/__init__.py"}]}