From d3e4a208256c86d3056b20da3e859b61049c9c18 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 25 Nov 2013 13:57:52 -0600 Subject: [PATCH] remove another function in favor of new 'which' helper Signed-off-by: Alfredo Deza --- ceph_deploy/install.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index 1c29684..bfd08fc 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -11,18 +11,6 @@ from .lib.remoto import process LOG = logging.getLogger(__name__) -def ceph_is_installed(conn): - """ - Check if the ceph packages are installed by looking for the - presence of the ceph command. - """ - stdout, stderr, return_code = process.check( - conn, - ['which', 'ceph'], - ) - return not return_code - - def install(args): version = getattr(args, args.version_kind) version_str = args.version_kind @@ -118,7 +106,8 @@ def purge_data(args): installed_hosts = [] for hostname in args.host: distro = hosts.get(hostname, username=args.username) - if ceph_is_installed(distro.conn): + ceph_is_installed = distro.conn.remote_module.which('ceph') + if ceph_is_installed: installed_hosts.append(hostname) distro.conn.exit() -- 2.47.3