]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
use the lsb_fallback when lsb is not found
authorAlfredo Deza <alfredo.deza@inktank.com>
Thu, 22 Aug 2013 13:10:45 +0000 (09:10 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Thu, 22 Aug 2013 13:10:45 +0000 (09:10 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/lsb.py

index 3965ed57b5022dff8f0614665a18d39402668709..2ed6cab030b72206f6f7b14a3fd22a1a4b71e884 100644 (file)
@@ -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()