def load_signature_key():
    '\n    Load the signature key from the environment\n    '
    try:
        key = settings.QRCODE_SIGNATURE_PRIVATE_KEY
        key_bytes = key.encode('utf-8')
    except AttributeError:
        print('Missing QRCode signing key')
        raise
    try:
        signing_key = SigningKey(key_bytes, encoder=Base64Encoder)
    except TypeError:
        print('Faulty QRCode signing key')
        raise
    return signing_key
Load the signature key from the environment
def load_signature_key():
    '\n    \n    '
    try:
        key = settings.QRCODE_SIGNATURE_PRIVATE_KEY
        key_bytes = key.encode('utf-8')
    except AttributeError:
        print('Missing QRCode signing key')
        raise
    try:
        signing_key = SigningKey(key_bytes, encoder=Base64Encoder)
    except TypeError:
        print('Faulty QRCode signing key')
        raise
    return signing_key