()
return mac
Get the mac address for our system as a fingerprint. If we can't
    get the mac, use the hash of our hostname as a subtitute
Get the mac address for our system as a fingerprint. If we can't
    get the mac, use the hash of our hostname as a subtitute
Get the mac address for our system as a fingerprint . If we can t get the mac use the hash of our hostname as a subtitute
def get_mac_address():
    """Get the mac address for our system as a fingerprint. If we can't
    get the mac, use the hash of our hostname as a subtitute"""

    mac = uuid.getnode()
    # check if getnode fails
    if (mac >> 40) & 1:
        hostname = socket.gethostname()
        print("warning: cannot find MAC. Using hostname (%s) to identify system" % hostname)
        mac = str(abs(hash(hostname)))
    else:
        mac = str(mac)
    return mac
def get_mac_address ( ) : mac = uuid . getnode ( ) # check if getnode fails if ( mac >> 40 ) & 1 : hostname = socket . gethostname ( ) print ( "warning: cannot find MAC. Using hostname (%s) to identify system" % hostname ) mac = str ( abs ( hash ( hostname ) ) ) else : mac = str ( mac ) return mac