

def _setup_profile_dir(self, profile, profile_dir, ipython_dir):
    if (ipython_dir is None):
        ipython_dir = get_ipython_dir()
    if (profile_dir is not None):
        try:
            self._cd = ProfileDir.find_profile_dir(profile_dir)
            return
        except ProfileDirError:
            pass
    elif (profile is not None):
        try:
            self._cd = ProfileDir.find_profile_dir_by_name(ipython_dir, profile)
            return
        except ProfileDirError:
            pass
    self._cd = None

dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/client/client.py Client._setup_profile_dir/original