menu/lcdmenu.py
def create_service_menu(service_name):
    """Creates a menu for the specified service
    :param service_name: The full name of the systemctl service, with or
    without the .service suffic
    :type service_name: basestring
    :return: A menu item datastructure"""

    def get_service_state(_):
        properties = probe_system_service(service_name)
        try:
            return properties[ACTIVE_STATE] + ", " + properties[SUB_STATE]
        except KeyError:
            return "Unknown state"

    return create_menu_item(service_name, get_service_state)
Creates a menu for the specified service
    :param service_name: The full name of the systemctl service, with or
    without the .service suffic
    :type service_name: basestring
    :return: A menu item datastructure
Creates a menu for the specified service
Creates a menu for the specified service
def create_service_menu(service_name):
    def get_service_state(_):
        properties = probe_system_service(service_name)
        try:
            return properties[ACTIVE_STATE] + ", " + properties[SUB_STATE]
        except KeyError:
            return "Unknown state"
    return create_menu_item(service_name, get_service_state)
def create_service_menu ( service_name ) : def get_service_state ( _ ) : properties = probe_system_service ( service_name ) try : return properties [ ACTIVE_STATE ] + ", " + properties [ SUB_STATE ] except KeyError : return "Unknown state" return create_menu_item ( service_name , get_service_state )
Creates a menu for the specified service
Creates a menu for the specified service
"""Creates a menu for the specified service
    :param service_name: The full name of the systemctl service, with or
    without the .service suffic
    :type service_name: basestring
    :return: A menu item datastructure"""
A menu item datastructure
A menu item datastructure
service_name
The full name of the systemctl service, with or
without the .service suffic
The full name of the systemctl service with or without the . service suffic