From: Alfredo Deza Date: Thu, 22 Aug 2013 13:10:45 +0000 (-0400) Subject: use the lsb_fallback when lsb is not found X-Git-Tag: v1.2.2~3^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f2d9dc23a98fb2729736f407f535f65e4ecca125;p=ceph-deploy.git use the lsb_fallback when lsb is not found Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/lsb.py b/ceph_deploy/lsb.py index 3965ed5..2ed6cab 100644 --- a/ceph_deploy/lsb.py +++ b/ceph_deploy/lsb.py @@ -1,3 +1,4 @@ +from . import hosts from . import exc def check_lsb_release(): @@ -10,6 +11,7 @@ def check_lsb_release(): process = subprocess.Popen( args=args, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, ) lsb_release_path, _ = process.communicate() ret = process.wait() @@ -70,7 +72,7 @@ def get_lsb_release(sudo): Get LSB release information from lsb_release. Check if lsb_release is installed on the remote host and issue - a message if not. + a message if not. Returns truple with distro, release and codename. Otherwise the function raises an error (subprocess.CalledProcessError or @@ -80,7 +82,7 @@ def get_lsb_release(sudo): check_lsb_release_r = sudo.compile(check_lsb_release) status = check_lsb_release_r() except RuntimeError as e: - raise exc.MissingPackageError(e.message) + return hosts.lsb_fallback(sudo) lsb_release_r = sudo.compile(lsb_release) return lsb_release_r()