Cosmetic tidy up of pid lookup function
The code flow can be made more obvious in this function Change-Id: Ie65d7af764485cfa78e7a322817f984a7ee2762c
This commit is contained in:
parent
ea46200a4f
commit
4615ef2930
|
@ -437,16 +437,16 @@ class Connection(SSH.Connection):
|
|||
so that a container lookup is not required on a subsequent
|
||||
command within the same task.
|
||||
"""
|
||||
if not self.is_container:
|
||||
return 1, ''
|
||||
|
||||
pid_path = """/proc/%s"""
|
||||
if self.is_container:
|
||||
lookup_command = (u"lxc-info -Hpn '%s'" % self.container_name)
|
||||
if not subdir:
|
||||
subdir = 'root'
|
||||
else:
|
||||
return 1, ''
|
||||
if not subdir:
|
||||
subdir = 'root'
|
||||
|
||||
if not self.container_pid:
|
||||
ssh_executable = self.get_option('ssh_executable')
|
||||
lookup_command = (u"lxc-info -Hpn '%s'" % self.container_name)
|
||||
args = (ssh_executable, 'ssh', self.host, lookup_command)
|
||||
returncode, stdout, _ = self._run(
|
||||
self._build_command(*args),
|
||||
|
|
Loading…
Reference in New Issue