[dummypython] add python doc strings

This commit is contained in:
Philip 2015-02-21 10:09:01 +01:00 committed by Teo Mrnjavac
parent 3330df99f3
commit e7a67b9c52
4 changed files with 19 additions and 29 deletions

View File

@ -32,8 +32,7 @@ from libcalamares.utils import check_chroot_call
def get_uuid(): def get_uuid():
""" """ Checks and passes 'uuid' to other routine.
Checks and passes 'uuid' to other routine.
:return: :return:
""" """
@ -49,8 +48,7 @@ def get_uuid():
def get_bootloader_entry_name(): def get_bootloader_entry_name():
""" """ Passes 'bootloader_entry_name' to other routine based on configuration file.
Passes 'bootloader_entry_name' to other routine based on configuration file.
:return: :return:
""" """
@ -62,8 +60,7 @@ def get_bootloader_entry_name():
def get_kernel_line(kernel_type): def get_kernel_line(kernel_type):
""" """ Passes 'kernel_line' to other routine based on configuration file.
Passes 'kernel_line' to other routine based on configuration file.
:param kernel_type: :param kernel_type:
:return: :return:
@ -81,8 +78,7 @@ def get_kernel_line(kernel_type):
def create_conf(uuid, conf_path, kernel_line): def create_conf(uuid, conf_path, kernel_line):
""" """ Creates gummiboot configuration files based on given parameters.
Creates gummiboot configuration files based on given parameters.
:param uuid: :param uuid:
:param conf_path: :param conf_path:
@ -114,8 +110,7 @@ def create_conf(uuid, conf_path, kernel_line):
def create_loader(loader_path): def create_loader(loader_path):
""" """ Writes configuration for loader.
Writes configuration for loader.
:param loader_path: :param loader_path:
""" """
@ -135,8 +130,7 @@ def create_loader(loader_path):
def install_gummiboot(efi_directory): def install_gummiboot(efi_directory):
""" """ Installs gummiboot as bootloader for EFI setups.
Installs gummiboot as bootloader for EFI setups.
:param efi_directory: :param efi_directory:
""" """
@ -167,8 +161,7 @@ def install_gummiboot(efi_directory):
def install_grub(efi_directory, fw_type): def install_grub(efi_directory, fw_type):
""" """ Installs grub as bootloader, either in pc or efi mode.
Installs grub as bootloader, either in pc or efi mode.
:param efi_directory: :param efi_directory:
:param fw_type: :param fw_type:
@ -205,8 +198,7 @@ def install_grub(efi_directory, fw_type):
def prepare_bootloader(fw_type): def prepare_bootloader(fw_type):
""" """ Prepares bootloader and set proper flags to EFI boot partition (esp,boot).
Prepares bootloader and set proper flags to EFI boot partition (esp,boot).
Based on value 'efi_boot_loader', it either calls gummiboot or grub to be installed. Based on value 'efi_boot_loader', it either calls gummiboot or grub to be installed.
:param fw_type: :param fw_type:
@ -240,8 +232,7 @@ def prepare_bootloader(fw_type):
def run(): def run():
""" """ Starts procedure and passes 'fw_type' to other routine.
Starts procedure and passes 'fw_type' to other routine.
:return: :return:
""" """

View File

@ -44,8 +44,7 @@ desktop_environments = [
def find_desktop_environment(root_mount_point): def find_desktop_environment(root_mount_point):
""" """ Checks which desktop environment is currently installed.
Checks which desktop environment is currently installed.
:param root_mount_point: :param root_mount_point:
:return: :return:
@ -60,8 +59,7 @@ def find_desktop_environment(root_mount_point):
def have_dm(dm_name, root_mount_point): def have_dm(dm_name, root_mount_point):
""" """ Checks if display manager is properly installed.
Checks if display manager is properly installed.
:param dm_name: :param dm_name:
:param root_mount_point: :param root_mount_point:
@ -74,8 +72,7 @@ def have_dm(dm_name, root_mount_point):
def set_autologin(username, displaymanagers, default_desktop_environment, def set_autologin(username, displaymanagers, default_desktop_environment,
root_mount_point): root_mount_point):
""" """ Enables automatic login for the installed desktop managers.
Enables automatic login for the installed desktop managers.
:param username: :param username:
:param displaymanagers: :param displaymanagers:

View File

@ -24,8 +24,7 @@ from libcalamares.utils import chroot_call
def run_dracut(): def run_dracut():
""" """ Creates initramfs, even when initramfs already exists.
Creates initramfs, even when initramfs already exists.
:return: :return:
""" """
@ -33,8 +32,7 @@ def run_dracut():
def run(): def run():
""" """ Starts routine to create initramfs. It passes back the exit code if it fails.
Starts routine to create initramfs. It passes back the exit code if it fails.
:return: :return:
""" """

View File

@ -24,8 +24,12 @@ from time import gmtime, strftime
def run(): def run():
""" """ Example Python jobmodule.
A Python jobmodule is a Python program which imports libcalamares and
has a function run() as entry point. run() must return None if everything
went well, or a tuple (str,str) with an error message and description
if something went wrong.
:return: :return:
""" """