]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
PhysicalConsole._pexpect_spawn(): pass logfile arg
authorZack Cerza <zack@redhat.com>
Thu, 18 Aug 2016 23:12:22 +0000 (17:12 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 23 Aug 2016 20:40:20 +0000 (14:40 -0600)
... directly when calling pexpect.spawn()

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/orchestra/console.py

index 9f9b88ffa6d8aac6c87cd82c08e4de75b6f35f0a..7ccd03e2751ce9485f06ff5ac3d84bd62368c83e 100644 (file)
@@ -38,9 +38,10 @@ class PhysicalConsole():
             log.error('Must set ipmi_user, ipmi_password, and ipmi_domain in .teuthology.yaml')  # noqa
         full_command = self._build_command(cmd)
         log.debug('pexpect command: %s', full_command)
-        child = pexpect.spawn(full_command)
-        if self.logfile:
-            child.logfile = self.logfile
+        child = pexpect.spawn(
+            full_command,
+            logfile=self.logfile,
+        )
         return child
 
     def _build_command(self, subcommand):