()
return os_name
Gets a machine ID based on settings or os information
Gets a machine ID based on settings or os information
Gets a machine ID based on settings or os information
def get_machine_id():
    """
    Gets a machine ID based on settings or os information
    """
    if hasattr(settings, 'PILLOWTOP_MACHINE_ID'):
        os_name = getattr(settings, 'PILLOWTOP_MACHINE_ID')
    elif hasattr(os, 'uname'):
        os_name = os.uname()[1].replace('.', '_')
    else:
        os_name = 'unknown_os'
    return os_name
def get_machine_id ( ) : if hasattr ( settings , 'PILLOWTOP_MACHINE_ID' ) : os_name = getattr ( settings , 'PILLOWTOP_MACHINE_ID' ) elif hasattr ( os , 'uname' ) : os_name = os . uname ( ) [ 1 ] . replace ( '.' , '_' ) else : os_name = 'unknown_os' return os_name