# Buggy code
def _get_starting_path_list(self):
    path = os.environ["PATH"]
    if on_win:
        # On Windows, the Anaconda Python interpreter prepends sys.prefix\Library\bin on
        # startup. It's a hack that allows users to avoid using the correct activation
        # procedure; a hack that needs to go away because it doesn't add all the paths.
        # See: https://github.com/AnacondaRecipes/python-feedstock/blob/master/recipe/0005-Win32-Ensure-Library-bin-is-in-os.environ-PATH.patch  # NOQA
        # But, we now detect if that has happened because:
        #   1. In future we would like to remove this hack and require real activation.
        #   2. We should not assume that the Anaconda Python interpreter is being used.
        path_split = path.split(os.pathsep)
        library_bin = r"%s\Library\bin" % (sys.prefix)
        # ^^^ deliberately the same as: https://github.com/AnacondaRecipes/python-feedstock/blob/8e8aee4e2f4141ecfab082776a00b374c62bb6d6/recipe/0005-Win32-Ensure-Library-bin-is-in-os.environ-PATH.patch#L20  # NOQA
        if normpath(path_split[0]) == normpath(library_bin):
            return path_split[1:]
        else:
            return path_split
    else:
        return path.split(os.pathsep)


# Traceback (ValueError)
Traceback (most recent call last):
File "/anaconda/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit
msg = self.format(record)
File "/anaconda/lib/python2.7/logging/__init__.py", line 734, in format
return fmt.format(record)
File "/anaconda/lib/python2.7/logging/__init__.py", line 465, in format
record.message = record.getMessage()
File "/anaconda/lib/python2.7/logging/__init__.py", line 329, in getMessage
msg = msg % self.args
File "/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__
return '%s: %s' % (self.__class__.__name__, text_type(self))
File "/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__
return text_type(self.message % self._kwargs)
ValueError: unsupported format character '{' (0x7b) at index 513
Logged from file exceptions.py, line 724

# Fixed code
def _get_starting_path_list(self):
    path = self.environ["PATH"]
    if on_win:
        # On Windows, the Anaconda Python interpreter prepends sys.prefix\Library\bin on
        # startup. It's a hack that allows users to avoid using the correct activation
        # procedure; a hack that needs to go away because it doesn't add all the paths.
        # See: https://github.com/AnacondaRecipes/python-feedstock/blob/master/recipe/0005-Win32-Ensure-Library-bin-is-in-os.environ-PATH.patch  # NOQA
        # But, we now detect if that has happened because:
        #   1. In future we would like to remove this hack and require real activation.
        #   2. We should not assume that the Anaconda Python interpreter is being used.
        path_split = path.split(os.pathsep)
        library_bin = r"%s\Library\bin" % (sys.prefix)
        # ^^^ deliberately the same as: https://github.com/AnacondaRecipes/python-feedstock/blob/8e8aee4e2f4141ecfab082776a00b374c62bb6d6/recipe/0005-Win32-Ensure-Library-bin-is-in-os.environ-PATH.patch#L20  # NOQA
        if normpath(path_split[0]) == normpath(library_bin):
            return path_split[1:]
        else:
            return path_split
    else:
        return path.split(os.pathsep)