def get_hmac_key()

in foundation_security_advisories/update_hof.py [0:0]


def get_hmac_key(apikey):
    key = ""
    try:
        response = http.get("https://bugzilla.mozilla.org/rest/bug/attachment/" + str(HMAC_KEY_ATTACHMENT_ID), headers=HEADERS, params={'api_key':apikey}).json()
        return base64.b64decode(response['attachments'][str(HMAC_KEY_ATTACHMENT_ID)]['data'])
    except requests.exceptions.RequestException as e:
        print(e)
        sys.exit(1)
    return key