]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
lsb.py: add some docstrings
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 21 Mar 2013 14:59:32 +0000 (15:59 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 21 Mar 2013 14:59:32 +0000 (15:59 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph_deploy/lsb.py

index 1814463a1e4a697cb7f189b7154f8d1743e7b67c..9c11770dea8043c3f55ef5041c3ea74f1901c013 100644 (file)
@@ -1,5 +1,12 @@
 
 def lsb_release():
+    """
+    Get LSB release information from lsb_release.
+
+    Returns truple with distro, release and codename. Otherwise
+    the function raises an error (subprocess.CalledProcessError or
+    RuntimeError).
+    """
     import subprocess
 
     args = [ 'which', 'lsb_release', ]
@@ -52,6 +59,11 @@ def lsb_release():
 
 
 def choose_init(distro, codename):
+    """
+    Select a init system for a given distribution.
+
+    Returns the name of a init system (upstart, sysvinit ...).
+    """
     if distro == 'Ubuntu':
         return 'upstart'
     return 'sysvinit'