code cleanup

pull/658/head
Steven Robertson 5 years ago
parent 50a11a80f0
commit cc11864b7d

@ -367,7 +367,6 @@ class PlayContextSpec(Spec):
# #511, #536: executor/module_common.py::_get_shebang() hard-wires
# "/usr/bin/python" as the default interpreter path if no other
# interpreter is specified.
# raise ValueError(parse_python_path(s))
return parse_python_path(s or '/usr/bin/python')
def private_key_file(self):
@ -582,7 +581,6 @@ class MitogenViaSpec(Spec):
# #511, #536: executor/module_common.py::_get_shebang() hard-wires
# "/usr/bin/python" as the default interpreter path if no other
# interpreter is specified.
# raise ValueError(parse_python_path(s))
return parse_python_path(s or '/usr/bin/python')
def private_key_file(self):

@ -1457,11 +1457,12 @@ class Connection(object):
def get_python_argv(self):
"""
Return the command necessary to invoke Python,
by returning a 1-element list containing :attr:`python_path` + codecs
Return the initial argument vector elements necessary to invoke Python,
by returning a 1-element list containing :attr:`python_path` if it is a
string, or simply returning it if it is already a list.
This allows emulation of existing tools where the Python invocation may
be set to e.g. `['/usr/bin/env', 'python']`
be set to e.g. `['/usr/bin/env', 'python']`.
"""
if isinstance(self.options.python_path, list):
return self.options.python_path

Loading…
Cancel
Save