Show More
@@ -650,18 +650,27 b' class SSHClusterLauncher(SSHLauncher):' | |||||
650 |
|
650 | |||
651 | If not specified, use calling profile, stripping out possible leading homedir. |
|
651 | If not specified, use calling profile, stripping out possible leading homedir. | |
652 | """) |
|
652 | """) | |
653 |
|
653 | |||
654 |
def |
|
654 | def _profile_dir_changed(self, name, old, new): | |
655 | """turns /home/you/.ipython/profile_foo into .ipython/profile_foo |
|
655 | if not self.remote_profile_dir: | |
656 | """ |
|
656 | # trigger remote_profile_dir_default logic again, | |
|
657 | # in case it was already triggered before profile_dir was set | |||
|
658 | self.remote_profile_dir = self._strip_home(new) | |||
|
659 | ||||
|
660 | @staticmethod | |||
|
661 | def _strip_home(path): | |||
|
662 | """turns /home/you/.ipython/profile_foo into .ipython/profile_foo""" | |||
657 | home = get_home_dir() |
|
663 | home = get_home_dir() | |
658 | if not home.endswith('/'): |
|
664 | if not home.endswith('/'): | |
659 | home = home+'/' |
|
665 | home = home+'/' | |
660 |
|
666 | |||
661 |
if |
|
667 | if path.startswith(home): | |
662 |
return |
|
668 | return path[len(home):] | |
663 | else: |
|
669 | else: | |
664 |
return |
|
670 | return path | |
|
671 | ||||
|
672 | def _remote_profile_dir_default(self): | |||
|
673 | return self._strip_home(self.profile_dir) | |||
665 |
|
674 | |||
666 | def _cluster_id_changed(self, name, old, new): |
|
675 | def _cluster_id_changed(self, name, old, new): | |
667 | if new: |
|
676 | if new: |
General Comments 0
You need to be logged in to leave comments.
Login now