]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology: s/sh/run/
authorKefu Chai <kchai@redhat.com>
Sun, 5 Apr 2020 15:20:55 +0000 (23:20 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 7 Apr 2020 17:12:03 +0000 (01:12 +0800)
to avoid using StringIO directly

Signed-off-by: Kefu Chai <kchai@redhat.com>
teuthology/task/mpi.py

index b6348c02ed6fb17bdc9e358650ab78ee1f9722a3..eaeb5d6bd5a525cca836dbc88d0be10a69296562 100644 (file)
@@ -1,7 +1,6 @@
 """
 Start mpi processes (and allow commands to be run inside process)
 """
-from StringIO import StringIO
 import logging
 import re
 
@@ -18,7 +17,7 @@ def _check_mpi_version(remotes):
     """
     versions = set()
     for remote in remotes:
-        version_str = remote.run(args=["mpiexec", "--version"], stdout=StringIO()).stdout.getvalue()
+        version_str = remote.sh("mpiexec --version")
         try:
             version = re.search("^\s+Version:\s+(.+)$", version_str, re.MULTILINE).group(1)
         except AttributeError: