This commit is contained in:
JonOfUs 2023-08-12 20:26:11 +02:00
parent 9d17358aa1
commit 823f4e3d82

View file

@ -40,7 +40,7 @@ def parse_wifi_map(map_path):
#print('\t\tdevice = {}'.format(device)) #print('\t\tdevice = {}'.format(device))
for identity in identities: for identity in identities:
if identity['mac'] == device: if identity['mac'] == device:
filtered_identities |= (identity['name']) filtered_identities |= {identity['name']}
#print('\n\nSSID count: {}, Device count: {}'.format(len(wifi_map), len(devices))) #print('\n\nSSID count: {}, Device count: {}'.format(len(wifi_map), len(devices)))
print('\nFiltered identities:') print('\nFiltered identities:')
@ -56,7 +56,7 @@ if __name__ == '__main__':
filtered_identities = parse_wifi_map(wifi_map_path) filtered_identities = parse_wifi_map(wifi_map_path)
# build request # build request
json_payload = json.dumps(filtered_identities).encode("utf-8") json_payload = json.dumps(list(filtered_identities)).encode("utf-8")
signature = hmac.new( signature = hmac.new(
key=bytes(WEBHOOK_SECRET, "utf-8"), key=bytes(WEBHOOK_SECRET, "utf-8"),