Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHLauncher tweaks #2270

Merged
merged 2 commits into from
Aug 9, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion IPython/parallel/apps/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def _user_changed(self, name, old, new):

def find_args(self):
return self.ssh_cmd + self.ssh_args + [self.location] + \
self.program + self.program_args
list(map(pipes.quote, self.program + self.program_args))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the explicit call to list here? map always returns a list, so I'm not sure why you need this one...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Habits from fighting against Python 3. I don't know if 2to3 always takes care of the list(map), since map returns a generator, and list + map is illegal in py3.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's leave it... Might as well start getting into a py3 mindset, sooner or later we'll be moving over.


def _send_file(self, local, remote):
"""send a single file"""
Expand Down Expand Up @@ -726,6 +726,9 @@ class SSHEngineSetLauncher(LocalEngineSetLauncher):
help="""dict of engines to launch. This is a dict by hostname of ints,
corresponding to the number of engines to start on that host.""")

def _engine_cmd_default(self):
return ['ipengine']

@property
def engine_count(self):
"""determine engine count from `engines` dict"""
Expand Down